ChangeAnimation("checkpoint", "off", FORWARD);
check_x=collide.x;
check_y=collide.y;
ChangeAnimation("Antenna", "AntennaOff", FORWARD);
switch(collide.state)
{
case 0:
ChangeAnimation("Collide Actor", "AntennaOn", FORWARD);
PlaySound2...
collide.state=1;
break;
}
check_x=collide.x;
check_y=collide.y;
collide.animindex=0
switch(collide.animindex)
{
case 0:
PlaySound2...
collide.animindex=1;
break;
}
happyjustbecause wrote:The animation isn't switching for some reason
check_x=collide.x;
check_y=collide.y;
ChangeAnimation("Antenna", "AntennaOff", FORWARD);
switch(collide.animindex)
{
case 0:
ChangeAnimation("Collide Actor", "AntennaOn", FORWARD);
PlaySound2...
break;
}
check_x=collide.x;
check_y=collide.y;
switch(collide.animindex)
{
case 0:
ChangeAnimation("Collide Actor", "AntennaOff", FORWARD);
ChangeAnimation("Collide Actor", "AntennaOn", FORWARD);
PlaySound2...
break;
}
If you want to do that, then you should put the ChangeAnimation into the case statement.
check_x=collide.x;
check_y=collide.y;
ChangeAnimation("Antenna", "AntennaOff", FORWARD); // this changes all antenna actors off
switch(collide.animindex) // this gets the animindex of the antenna you are colliding with
{
case 0: // but this is always 0, because line 3 sets all antenna off
ChangeAnimation("Collide Actor", "AntennaOn", FORWARD);
PlaySound2... // therefore the sound always plays
break;
}
check_x=collide.x;
check_y=collide.y;
switch(collide.animindex)
{
case 0:
ChangeAnimation("Antenna", "AntennaOff", FORWARD); // this changes all of them to off
ChangeAnimation("Collide Actor", "AntennaOn", FORWARD); // this changes the colliding one on
PlaySound2...
break;
}
Users browsing this forum: No registered users and 1 guest