K
Ken Joust
Guest
So the issue is that when I create an object called obj_slow_time, it is supposed to slow all enemies down to 20% then reset them back to their original speed when the obj_slow_time destroys itself. However, when obj_slow_time is created in the room, it only slows down a single (first enemy of an object type created in the room.) The script is in the parent object of both enemy types, I've already tried putting the scripts in the different enemy type objects separately with no change </3.
I am at a hugeeeeee loss.
This is the script that is on the End Step of the parent object for my enemies.
Then this is the code for the object that is created and destroyed after a certain amount of time. (It destroys itself and works, and actually slows down a SINGLE enemy correctly.)
This is the Create Event for obj_slow_time
And this is the step event of obj_slow_time
I've noticed that only the first created type of an enemy is affected by this code. So if I had 5 wolves and 3 tigers coming at you, the obj_slow_time will only slow the first wolf and the first tiger created in the room.
I am quite new to GameMaker and to the coding world, so forgive my ignorances.
Any help would be much appreciated as this is quite frustrating!
I can post other code if need be.
Thanks for reading.
I am at a hugeeeeee loss.
This is the script that is on the End Step of the parent object for my enemies.
Then this is the code for the object that is created and destroyed after a certain amount of time. (It destroys itself and works, and actually slows down a SINGLE enemy correctly.)
This is the Create Event for obj_slow_time
And this is the step event of obj_slow_time
I've noticed that only the first created type of an enemy is affected by this code. So if I had 5 wolves and 3 tigers coming at you, the obj_slow_time will only slow the first wolf and the first tiger created in the room.
I am quite new to GameMaker and to the coding world, so forgive my ignorances.
Any help would be much appreciated as this is quite frustrating!
I can post other code if need be.
Thanks for reading.