Changing Animation due to 'damage' in regions?
Posted: Mon May 28, 2007 11:19 pm
Actually alot of questions but this is the main one here:
Is there a way to change an animation based upon one object entering the area/region of another?
For example;
I have a car 'actor' and I want to be able to change the animation of the car if it runs into something, to an animation that shows damage.
Do you put an IF statement in there combined with a region actor or what because I can't get it to work?
Additionally, what would a generic IF statement look like in Game Editor? For example, I tried creating a collision state with an IF statement;
IF (x = -280 || x = 280) // the x coordinates for either side of the screen
{
//collision state
}
Would that be how it is done?
How would you make the 'rule' that this car cannot go sideways (x axis) and only forward and backward?
-------------------------------------------------------------------------------------
Also, if the animation I have to change to is a string of animations (ie: a gif), how do I get the engine to display only one animation out of this 'gif' or is that even possible?
-------------------------------------------------------------------------------------
And finally, lets say I were making a zombie game with the screen centered around the player, as 'zombies' entered the view area, how could I get them to path in chase of the player within a certain distance. In this instance, it wouldn't matter for the 'zombies' to 'forget' the player after a certain distance, though that info would also be useful. Is this the case for an IF statement as well.
-------------------------------------------------------------------------------------
Other general questions:
- Could you make a menu using a case 'switch' function in this system?
- Could you make a isometric character if you animated a full 360 degrees view of this character and a background for that matter?
-------------------------------------------------------------------------------------
I know this is alot, but I have been forum searching for most of my answers and alot of the threads are incomplete (ie: there is no answer to the original question that is asked). Appreciate any help. - Thanx
Is there a way to change an animation based upon one object entering the area/region of another?
For example;
I have a car 'actor' and I want to be able to change the animation of the car if it runs into something, to an animation that shows damage.
Do you put an IF statement in there combined with a region actor or what because I can't get it to work?
Additionally, what would a generic IF statement look like in Game Editor? For example, I tried creating a collision state with an IF statement;
IF (x = -280 || x = 280) // the x coordinates for either side of the screen
{
//collision state
}
Would that be how it is done?
How would you make the 'rule' that this car cannot go sideways (x axis) and only forward and backward?
-------------------------------------------------------------------------------------
Also, if the animation I have to change to is a string of animations (ie: a gif), how do I get the engine to display only one animation out of this 'gif' or is that even possible?
-------------------------------------------------------------------------------------
And finally, lets say I were making a zombie game with the screen centered around the player, as 'zombies' entered the view area, how could I get them to path in chase of the player within a certain distance. In this instance, it wouldn't matter for the 'zombies' to 'forget' the player after a certain distance, though that info would also be useful. Is this the case for an IF statement as well.
-------------------------------------------------------------------------------------
Other general questions:
- Could you make a menu using a case 'switch' function in this system?
- Could you make a isometric character if you animated a full 360 degrees view of this character and a background for that matter?
-------------------------------------------------------------------------------------
I know this is alot, but I have been forum searching for most of my answers and alot of the threads are incomplete (ie: there is no answer to the original question that is asked). Appreciate any help. - Thanx