I
iLeD
Guest
Hi there, new to this forum hope you can help.
I can't seem to figure this out, maybe because it's 03:32 but anyway here's what I'm trying to do. I have a random head sprite that creates a random body sprite on creation using a specific instance:
This puts the body and head in the same place. Great! Now in the bodies step event he starts wandering about randomly so I want the head to follow. If I reference the inst.x / inst.y in the step or end step event I get a set before reading error. Any ideas?
Thank you!
I can't seem to figure this out, maybe because it's 03:32 but anyway here's what I'm trying to do. I have a random head sprite that creates a random body sprite on creation using a specific instance:
Code:
//inside head object
var inst = 0;
inst = instance_create(x, y, obj_enemy_body);
with (inst)
{
inst.x = x;
inst.y = y;
}
Thank you!