A complex animation

Started by piraatlife4me, Thu 04/12/2003 23:39:45

Previous topic - Next topic

piraatlife4me

Hey its Dan here! Hey guys I am in need of a serious favor.  I have this pretty long and complicated animation setup and I need help getting it work right.  What I have is a scrolling room the scene is a valet parking attendent with an animation of a car pulling up to the curb the man getting out walking to the booth paying the attendent and walking off the left side of the screen.  So I have my attendent in a booth in the room, I imported all of my sprites as the entire screen so they would all align properly and just erased parts on the sprites where they would need to be behind(taking the walkbehinds into my own hands you could say)  I thought I had this all worked out but the problem is these two objects I have in my scene.  One is a clipboard that is on the desk of the booth, another is the guard rail to the parking lot (which is object animated during the character animation)  My main problem is during this ridiculously long animation I had spent a whole day creating is conflicting with the rooms object baselines at different times of the animation.  It's kinda hard to explain so I will describe more in detail the first animation is the guy pulling up and him getting out of his car and walking over to the booth window(all in one loop)Next I have the attendent  wait for a bit, then I animate the object(the one in the way) so the guard rail goes up, I have the attendent walk to the car get in drive, park,get out, and walk back to the booth all in another loop.  During this loop I need the baseline of the rail object manually set to different points in the room when different frames are being displayed since the sprites are displayed over everything else.  I know this really confusing  I just really some need help.  If anyone knows a way to manually set a baseline during an animation or while it is running is basically what I need to know.
Also after I can get the kinks out of this one I need all of this to be animated in the background somehow because the clipboard on the counter of the booth I want to be a hotspot  available for taking when the attendent is away from the booth!
So if anyone has any ideas or solutions to any of these things please let me know ok
Or if it dosent make any sense ask and I will explain it again
thanks again
Daniel
Winebarger

Timosity

#1
You can change object, walkbehind and character baselines in script with

SetCharacterBaseline(CHARID, int baseline);

SetObjectBaseline(int object, int baseline);

SetWalkBehindBase(int area, int baseline);

you can change any of these any time during the animations (but obviously at the right time)


To have animations occurring and allow you to still have control of your player character play around with something like this:

in rooms repeatedly execute

if (GetGlobalInt(10)==1) { //set global int 10 to one when you want the character to animate (eg turn away)

SetCharacterView(EGO,5);
AnimateCharacter(EGO,0,5,0);
SetTimer(4,200);
SetGlobalInt(10,2); // to get to next part of code
}


if (GetGlobalInt(10)==2) {
if (IsTimerExpired(4)==1) {
AnimateCharacterEx(EGO,0,5,0,1,0);
SetGlobalInt(10,3); // to get to next part of code
}
}

if (GetGlobalInt(10)==3) {
if (character[EGO].animating==0) {
SetGlobalInt(10,1); // to get back to start of loop
}
}



with This bit of code, EGO will turn with the first animation, then wait for about 5 seconds and then turn back, this will happen continually and you will have complete control of the player.

If you want the character to stop turning, you can set globalint 10 to 0 or 4 or higher when you pick up the object, or somewhere else in the script where you like.

You could have it so you can only pick up the object when globalint 10 = 2, or something like that.


I hope I'm on the right track for what you're after.

~Tim

SMF spam blocked by CleanTalk