Home   Help Search Login Register  

Author Topic: saluting, press ups etc...  (Read 771 times)

0 Members and 1 Guest are viewing this topic.

tHe s4lut3

  • Guest
saluting, press ups etc...
« on: 22 May 2004, 21:10:45 »
i wonder how to MAINTAIN the actions i "told" the soldiers to do......i'm working on a mission which i wanted to bring some life to with putting in saluting, patroling, sitting down and so on but as soon as my main units trigger another trigger ;D ;) or another waypoint, these soldiers just stand there and do nothing...al standing there with a gun which of course destroys the whole atmosphere........i'm wondering if it makes a difference in which line i enter the actions and if it has something to do with the "on (de)activation" lines........

j-man

  • Guest
Re:saluting, press ups etc...
« Reply #1 on: 22 May 2004, 21:37:10 »
Some animations require the soldier to be set to a certain behaviour (safe/aware etc...). Also, the talking animation requires the soldier to have a gun.

The "DeActivation" field is only for triggers. It's the opposite of the "On Activation" field. When the triggers condition is met, what ever is in the "On Activation" field is executed. If the trigger's condition is false, what ever is in the "DeActivation" is executed. But one important thing about deactivation fields, is that the trigger's condition must be  met before the deactivation field can be triggerd.

tHe s4lut3

  • Guest
Re:saluting, press ups etc...
« Reply #2 on: 22 May 2004, 21:43:44 »
ok thanx...
could i put some of the actions in the init line to?
how i do i seperate differnt things in a line because if i simply type them in one one by one i get Â'the "unknown operator" refusal(yes i did give the units names)?
is there a difference between "this" and "unitname"?

Dubieman

  • Guest
Re:saluting, press ups etc...
« Reply #3 on: 22 May 2004, 21:53:13 »
Yeah try messing with safe and alert for animations.
Not quite sure what your asking but to seperate diff pieces of script go like this

booger addweapon "RAYGUN"; booger addaction [jump]

the ; seperates scripts and pieces of scripts

using this in the init field of a unit is like saying THIS unit addweapon "M16", but using the actual name works too. Bob addweapon "RAYGUN"

In triggers that aren't grouped to a specific unit the THIS thing like this addaction [jump] adds the action to the unit who triggered the trigger. By putting Bob addaction [jump] then the unit activates the trigger and bob gets a new action.

Hope that explains it. :P

tHe s4lut3

  • Guest
Re:saluting, press ups etc...
« Reply #4 on: 22 May 2004, 22:15:03 »
yeah, that was what i was asking, thank you!

by the way is there a list of animations/actions  somewhere out there?

is there really only saluting, sitting, patroling and doing pushups to bring life to a mission (intro)?

j-man

  • Guest
Re:saluting, press ups etc...
« Reply #5 on: 22 May 2004, 22:30:55 »
Check the reference's section in the ed. depot. It has tons of stuff on unit actions and animations.

EDIT:

http://www.ofpec.com/editors/resource_view.php?id=471

A nice list of unit animations made by Macguba.

I also know that a nice mission was made that allowed you to select and watch all the possible animations. But i dont have a link to it. Try looking in the ed. depot.
« Last Edit: 22 May 2004, 22:34:12 by j-man »

tHe s4lut3

  • Guest
Re:saluting, press ups etc...
« Reply #6 on: 23 May 2004, 01:12:37 »
sorry j-man your first post is puzzling me a bit..... i mean i get what you are saying but i need a practical hint on how  to keep the units on what they're doing.....

should i write the behaviour in the init line of the unit and the action in the on activation line or what?

j-man

  • Guest
Re:saluting, press ups etc...
« Reply #7 on: 23 May 2004, 02:04:15 »
Depends on what anim your trying to do.

For example, if you want the unit to talk, then the following can just be added to the unit's init field:
Code: [Select]
this setbehaviour "SAFE"; this switchmove "EffectStandTalk"The unit neeeds to be set to "safe" in order for the anim to work.

Animation that have "FX" in them, such as: "FXKneel", need to be put in the "On activation" field of a trigger/waypoint or in a script. If not, then the anim won't work
« Last Edit: 23 May 2004, 02:07:03 by j-man »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:saluting, press ups etc...
« Reply #8 on: 23 May 2004, 11:44:20 »
If the animation is not conditional on another event, then you don't need a trigger.    

Switchmove/playmove animations often don't work from the unit's init field.    You kinda feel they should, but that's just one of the joys of OFP.

Many animations only last a few seconds.    To make the unit do it again (and again and again) you need to issue the command each time.   There are several ways of doing this... you could write a little script with a loop .... or, more elegantly, create a game logic, give it some waypoints finishing with cycle and in each waypoint put the appropriate delay and the relevant animation commands.

Plenty of reviewed ArmA missions for you to play

Loup-Garou

  • Guest
Re:saluting, press ups etc...
« Reply #9 on: 24 May 2004, 14:23:50 »
Here's an example of a script, named "Loopanim.sqs "(put it in the mission folder) :

#loop
Guy1 switchMove "FXStandDip"

~3

goto "loop"

exit

In the editor, you'll put a unit like this :
Name = Guy1, Initialization = [] exec "Loopanim.sqs"

DONE  ;) !

tHe s4lut3

  • Guest
Re:saluting, press ups etc...
« Reply #10 on: 24 May 2004, 14:32:50 »
another thanx to you all!

DBR_ONIX

  • Guest
Re:saluting, press ups etc...
« Reply #11 on: 24 May 2004, 17:48:39 »
A better version of the code is this ;)
Code: [Select]
_guy = this select 0

#loop
Guy1 swithMove "FXStandDip"
~3
goto "loop"

exit

It's the same, but you don't need 1 script for each person.. You can use this on any one in the whole map as many times as you need
You put in the init field ::
[this] exec "pushup.sqs"

Or, in a script, [unitname] exec "pushup.sqs"

The
Code: [Select]
_guy = this select 0 bit does that :)
if you had two things, like : [guy1,"hi"] exec "talk.sqs"
You use _varable = this select 1

etc

Good luck :)
- Ben

j-man

  • Guest
Re:saluting, press ups etc...
« Reply #12 on: 24 May 2004, 19:20:42 »
Code: [Select]
_guy = this select 0

#loop
_guy swithMove "FXStandDip"
~3
goto "loop"

exit

The variable needs to be used in the "switchmove" line.