Makkeonmies
Member
So the characters in my top-down strategy game form footprints to the ground when they move.
I've implemented the following code for the characters ('units):
Create:
canprint=1
Step:
if canprint=1
{
if !place_meeting(x,y,waterpar)
{
if speed > 0
{
instance_create(x,y,footprints)
can_print=0
alarm[0]=5
}
}
}
Alarm 0:
canprint=1
However they still keep making footprints even when they are still, that is, their speed is 0. Every unit has a variable 'spd' to represent their base speed (which can be altered through different means) but ive also tried implementing that into the code instead of speed (if spd > 0) to no avail, however.
Is there smth wrong with the order here, or the use of Events?
I've implemented the following code for the characters ('units):
Create:
canprint=1
Step:
if canprint=1
{
if !place_meeting(x,y,waterpar)
{
if speed > 0
{
instance_create(x,y,footprints)
can_print=0
alarm[0]=5
}
}
}
Alarm 0:
canprint=1
However they still keep making footprints even when they are still, that is, their speed is 0. Every unit has a variable 'spd' to represent their base speed (which can be altered through different means) but ive also tried implementing that into the code instead of speed (if spd > 0) to no avail, however.
Is there smth wrong with the order here, or the use of Events?