This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hi guys. I have run into a really annoying problem, please can someone give me a hand <3
I have the following problem:
I have a moving object I am using in my game, this object is used more than a few times in a level and I need to save and load each ones x and y into an ini file, the reason why is because my character has to jump on these objects to get from one platform to another. I created a script that does save the object but the issue is that it is saving all instances of that object in one x and y, so when I load again all the object are together in one place and the level is unplayable.
Current save scripts:
if (file_exists("PlatformPosition.sav")) file_delete("PlatformPosition.sav");
{
ini_open("PlatformPosition.sav");
ini_write_real("Save1", "y", obj_moving_platform.y);
ini_write_real("Save1", "x", obj_moving_platform.x);
ini_close();
}
Current load script:
if (file_exists("PlatformPosition.sav"))
{
ini_open("PlatformPosition.sav");
obj_moving_platform.y = ini_read_real("Save1", "y", 0);
obj_moving_platform.x = ini_read_real("Save1", "x", 0);
ini_close();
}
I have tried: I'm not sure what to try, I have googled and looked at the manual to try find how to save separate x and y for multiples of the same object but have not found anything.
I am using: GameMaker pro on Steam
Much Love ABI7ITY
Subreddit
Post Details
- Posted
- 8 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/gamemaker/c...