how can i use a create actor event for fighting. 4 example, when i press a button, it destroys an actor and another sprite/actor appears in the same place, because the collision event doesn't really work that well.
i m so confused
char *key=GetKeyState();
if (key[KEY_RIGHT] == 1 && key[KEY_LEFT] == 0 && Punch == 0)
{
x += 5;
if(AnimFinish == 0)
{
ChangeAnimation("Event Actor", "Right", FORWARD);
}
}
if (key[KEY_RIGHT] == 1 && key[KEY_LEFT] == 1)
{
ChangeAnimationDirection("Event Actor", STOPPED);
}
char *key=GetKeyState();
if (key[KEY_RIGHT] == 0 && key[KEY_LEFT] == 1 && Punch == 0)
{
x -= 5;
if(AnimFinish == 0)
{
ChangeAnimation("Event Actor", "Left", FORWARD);
}
}
if (key[KEY_RIGHT] == 1 && key[KEY_LEFT] == 1)
{
ChangeAnimationDirection("Event Actor", STOPPED);
}
if(Punch == 1)
{
DestroyActor("Collide Actor");
}
Users browsing this forum: No registered users and 1 guest