• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Big Error.

I created an enemy. He must move around the room and, when meeting with the player, move towards him. Everything worked fine. Now I tried to make a random spawn of enemies, but he began to write that there is no function.

Variable Obj_Pile_of_dust.updPD(100059, -2147483648) not set before reading it.
at gml_Object_Obj_Pile_of_dust_StepNormalEvent_1 (line 3) - if (updPD = 0) && (MoveYes = 0) && (global.MoveNo = 0)

But the command have this value.

room start
updPD = 0;

Help! Whats happened?
 
H

Haulidaie

Guest
The Room Start event is down the list a ways in what's executed first. Try saving your variables in the Create event instead.

Now, what help do you need with creating a "random spawn of enemies," and what do you mean by that?
 
The Room Start event is down the list a ways in what's executed first. Try saving your variables in the Create event instead.

Now, what help do you need with creating a "random spawn of enemies," and what do you mean by that?
I can assume that since the command of the “Room Start” takes place in the Object of the enemy, and there are several of them, something breaks.
 
The Room Start event is down the list a ways in what's executed first. Try saving your variables in the Create event instead.

Now, what help do you need with creating a "random spawn of enemies," and what do you mean by that?
I can not save it in Create, as these numbers change.
 
H

Haulidaie

Guest
If you post your step event code, I might be able to help more.
 
Top