#Problem with player transfer.

1 messages · Page 1 of 1 (latest)

gusty osprey
#

Don't save rooms as a number

#

You should instead save/load with a string, converting them as

neon epochBOT
#

This function returns the name of the given room as a string.

Arguments
index: The room to check the name of.

#

This function gets the unique identifying index for a game asset from its name.

Arguments
name: The name of the game asset to get the index of (a string).

neat cove
#

I dont have problems with rooms, I got problems with coordinates

gusty osprey
#

I know, but I cannot emphasis this enough

#

You will have a bad time if you save rooms as you are doing right now

#

As for saving

#

How are you doing saving?

neat cove
#

ini_open("save.ini");

ini_write_real("position","room",room)
ini_write_real("position","x",ob_player.x)
ini_write_real("position","y",ob_player.y)

ini_write_real("cutscenes","scene_1",global.cutscene_1)
ini_close();

gusty osprey
#

You never saved anything under name

#

if (ini_key_exists("status", "name")) {

#

So this fails

#

Every time

#

I'd honestly just not have that there

neat cove
#

angle[0]=lerp(angle[0],0,0.5)
if(num[0]=0){
angle[0]-=random(1)-random(1);
scale[0]+=0.01;
alpha[0] +=0.05;
if(alpha[0]>=1){
ini_open("save.ini")
ini_write_string("status","name",text[0])
ini_close();
room_goto_game(R_testGame_1)
}
}
I Save name Right here

#

in step

gusty osprey
#

Why do you save name there?

#

What does name serve?

neat cove
#

Anyway, If I remove Name Saves I cant load my game anyway

#

Even if I remove name save

gusty osprey
#

I'd like to see what you were trying to do

neat cove
#

Like code or Screenshot?

#

Sorry

#

I dont really understand what"serve"means

gusty osprey
#

ini_write_string("status","name",text[0])

#

What's in text[0], why is it being saved under name

neat cove
#

oh

#

I see

#

Where must be global.character_name

gusty osprey
#

Why isn't it being saved with the room and x/y position?

neat cove
#

Cuze it being saved in this code

gusty osprey
#

But why?

#

Where is the room and x/y position even being ran from?!

neat cove
gusty osprey
#

Event

#

Object

#

Where

neat cove
#

Wait a sec

#

Here save Function ini_open("save.ini");

ini_write_real("position","room",room)
ini_write_real("position","x",ob_player.x)
ini_write_real("position","y",ob_player.y)

ini_write_real("cutscenes","scene_1",global.cutscene_1)
ini_close();

#

if(dialog=1){

draw_dialog(1,"*You take a quick nap near this strange looking stone.",snd_text,1,0.75)

}
if(dialog=2){
if(global.letters=0){
**save();
}
draw_dialog(1,"*You are save",snd_text,1,0.75)
}
if(dialog==3){
if(global.letters=0){
audio_play_sound(snd_save_point,1,0)
}
dialog_over()

} this is where I stated it

gusty osprey
#

But where

#

Do you

#

Call it

neat cove
#

Here

#

where Save();

#

You need to press Z and then it saves the game

gusty osprey
#

Do you know what an event is?

#

Or an object?

neat cove
#

yes

gusty osprey
#

Then please tell me

#

Which event and object

#

Do you call it