10th January 2016, 03:09 AM
Something that I need help...
So I was testing the engine for a game that i want to make, and in fact it's a great one and im looking foward for this one. I made an .mfa to show you what i want
10th January 2016, 03:25 AM
You can use Global Values to save and load the hero's position. I altered your .mfa to show you what I mean.
10th January 2016, 01:19 PM
It's exactly what i needed thank you, but can you explain me what you modified in the .mfa, what is your coding saying
10th January 2016, 02:53 PM
When the counter hits 1 the game saves the hero's X and Y position to Global Value A and B before it jumps to the battle frame. I renamed the global values to HeroPosX and HeroPosY. You don't have to rename them but it helps to remember what the values are used for.
I also made it so that the hero's position is set to Global Value A and B when the "Start of Frame" event runs.
In the battle frame I didn't do much except jumping back to the first frame when the enemy's health reaches 0.
Summarized what we're doing is simply saving and loading the hero's position using two global values. The strength of global values is that they are accessible from every frame in the game, unlike normal alterable values and counters they do not reset when a frame ends.
Tags for this Thread