William Garrison
Member
Hey friends. Im stumped again. I have tried so many different things. Again, I am sure the solution is somewhat simple, just need a more seasoned coder to help me see it. So here is what I have and what I am after.
Once someone types the pet command this code runs...
Inside of the oFloofPet object I have an Animation End event that destroys the instance.
This works fine, my issue is that one it destroys itself I want to redraw the original oFloof object in its place. Sounds simple to do to me, but I have tried everything from instance_create_layer to instance_change to sprite change. Sprite change works but then its tagged as oFloofPet and the original code no longer works cause its looking for oFloof.
Pulling my hair out. Any help is greatly appreciated friends.
Once someone types the pet command this code runs...
Code:
if (pet != false)
{
with (oFloof)
{
var floofX = oFloof.x;
var floofY = oFloof.y;
instance_destroy(oFloof);
instance_create_layer(floofX,floofY,"World",oFloofPet);
pet = false;
}
}
This works fine, my issue is that one it destroys itself I want to redraw the original oFloof object in its place. Sounds simple to do to me, but I have tried everything from instance_create_layer to instance_change to sprite change. Sprite change works but then its tagged as oFloofPet and the original code no longer works cause its looking for oFloof.
Pulling my hair out. Any help is greatly appreciated friends.
Last edited: