S
Soren11112
Guest
My step events seem to run before my create events. Because what happens is I get an error on my enemies creation. The error says that state is not defined.
All the code on my create event:
var state = asset_get_index(scr_guard1static)
//Variables
guardhp = 100;
guardSpeed = 3.8;
aggroRange = 300;
All the code on my step event:
//Guard Death
if guardhp <= 0
{
instance_create(guardstandard.x,guardstandard.y,guardknockedoutob)
instance_destroy();
}
script_execute(state)
All the code on my create event:
var state = asset_get_index(scr_guard1static)
//Variables
guardhp = 100;
guardSpeed = 3.8;
aggroRange = 300;
All the code on my step event:
//Guard Death
if guardhp <= 0
{
instance_create(guardstandard.x,guardstandard.y,guardknockedoutob)
instance_destroy();
}
script_execute(state)