Home   Help Search Login Register  

Author Topic: Greetings...and animation question  (Read 1157 times)

0 Members and 1 Guest are viewing this topic.

woodser82

  • Guest
Greetings...and animation question
« on: 14 Aug 2006, 23:17:49 »
First of all I would like to commend everyone involved with this site, I know recently there have been some problems, but it still remains a great resource; full of the best Ofp scripters, mission makers, etc.  I have gotten many nice addons, missions, etc from here in the past too. 

The reason for my post, is that I have been trying pretty much all day to make a dude sit in a chair (WAIT!!! DON'T CLOSE THIS!!)  I, of course figured out how to do this, but then old boy becomes static, even if dead.  Do you recommend scripting another animation after onchair, or maybe null?  I'm not sure, but I want general guba to be sitting down for a meeting and get smoked by the sniper (myself).   Basically, how do I keep a unit animated but also responsive to enemy activity?? 

Any help could be great, although I have gotten more than enough from this site already!!

Pat

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Greetings...and animation question
« Reply #1 on: 14 Aug 2006, 23:27:21 »
well, you've played an animation to get him to sit. the answer lies in noticing when he gets killed, then playing another animation.

set up a trigger, condition

Code: [Select]
not (alive guba)
on activation

Code: [Select]
guba switchmove "falling_off_chair_dead"
now obviously there's no such animation - as far as i know - but look through the Switchmove/Playmove Animation Library in the tutorials section of the ed depot, you should find something that'll fit.

and welcome back ;)


Offline nominesine

  • Former Staff
  • ****
  • I'm NOT back!
    • The IKB Forum
Re: Greetings...and animation question
« Reply #2 on: 14 Aug 2006, 23:30:25 »
I don't know what animation you are using and i don't think it matters. It's the command that triggers the animation that's causing you trouble.

There's two ways to start an animation:

1) playMove

This is the smoother of the two alternatives. It will tell the unit to perform the movement as soon as possible, but it doesn't actually force him to perform the animation if he's busy doing something else (like getting in and out of a car, that also requires animations). Generally I use playMove if I can, but it doesn't work on all commands.

2) switchMove

This one works on most commands, and it forces the unit to execute the animation instantly, no matter what he was doing before. I suspect that you are using this one, right?

Either change your code to

Code: [Select]
unitName playMove "animationName"
or force him to leave the switchMove with another switchMove command. The later is done in the following way.

1) Make a trigger without any area.
2) Set the Condition to
Code: [Select]
!(alive unitName)3) Set the Activation to
Code: [Select]
unitName switchMove "NULL"
unitName refers to the sitting unit. The NULL command will force him to leave the switchMove instantly. The downside is that he snaps out of it, without a smooth transition. I think that will solve your problem.

EDIT: Bedges was faster than me, but the despite the fact that we answered your question in two different ways both answers are valid. Ofp is truly a marvelous game engine.
« Last Edit: 14 Aug 2006, 23:32:35 by nominesine »
OFPEC | Intel Depot
RETARDED Ooops... Retired!

woodser82

  • Guest
Re: Greetings...and animation question
« Reply #3 on: 14 Aug 2006, 23:39:51 »
Wow, you guys really are on top of things around here...I appreciate it and will use it in my new mission.  BTW, is Armed Assault replacing OFP2 or is it something entirely different.  I'm surprised that there are more "unofficial" people and info about it than "official" stuff.  Oh well, hopefully it comes out soon and my PC can handle it.  Probably will have to upgrade just for that game, haha.  Thanks again!

Pat

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re: Greetings...and animation question
« Reply #4 on: 14 Aug 2006, 23:57:48 »
OFPEC is an editing site and we prefer to avoid speculation about as yet non-existant games.   However, since you were so nice ....  :D  Armed Assault is the successor to Operation Flashpoint.  It is not OFP2, which is a much more distant and uncertain game.   ArmA is sort of "OFP 1.5" if you like.

Right, lets get back on topic ....
Plenty of reviewed ArmA missions for you to play

woodser82

  • Guest
Re: Greetings...and animation question
« Reply #5 on: 15 Aug 2006, 03:03:48 »
Gotcha.  The animation advice worked like a charm.   ;D