Changing Animation due to 'damage' in regions?

Game Editor comments and discussion.

Changing Animation due to 'damage' in regions?

Postby cipher88101 » 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
Attachments
example.jpg
cipher88101
 
Posts: 5
Joined: Sun May 20, 2007 6:52 am
Score: 0 Give a positive score

..

Postby d-soldier » Tue May 29, 2007 9:03 am

wow, saw this one earlier and decided to let someone else handle it... Many hours later, nothing here. Given your goal regarding variable damage to your actor, I think you will have to have several actors parented together, to act as your player actor. Break up the vehcile into four sections, and make sprites from each of those sections to indicate damage. This way you can use straight collision events to move the animpos forward and show damage, rather then regions...
Last edited by d-soldier on Tue May 29, 2007 3:35 pm, edited 1 time in total.
User avatar
d-soldier
 
Posts: 703
Joined: Sun Apr 08, 2007 2:13 am
Score: 61 Give a positive score

Postby cipher88101 » Tue May 29, 2007 2:08 pm

Thanks D, I'll give it a shot...appreciate the response. :D
cipher88101
 
Posts: 5
Joined: Sun May 20, 2007 6:52 am
Score: 0 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron