View Full Version : Make soldiers sit down and stay down?
Dec 6 2006, 13:36
Hello. I am trying to make 3 soldiers sit down around a fire, and face the proper direction. Can anyone help me get the soldiers to sit and stay seated int he right direction? I tried searching around but I have had no luck....I have found bits and pieces but I am too new to put it all together. Thanks in advance
Dec 6 2006, 18:31
I continued my search and found some info on OFPEC
group_name setformdir value
unit_name switchmove "EffectStandSitDownStill"
and i believe i can just add this into the waypoint to have them sit when they reach it
in order to make a unit sit forever u need to use the playmove command. also units will only perform these actions using a .sqs script. What you need to do is find the action name u want(there not the same as ofp) i found them on this forum so check each thread relating to actions. Open the sqs and type.
"unitname" setbehaviour safe
"unitname" playmove "movenameuwouldliketoplay"
To create a sqs file use wordpad then save it as "name".sqs (remove the .txt) Save it to the usermissions directory.
then to get him to play move type in his initialisation;
Its easy once u learn how but u need to get the action list
You can just make a waypoint or a trigger. Just type on the "on activation" field:
unitname playmove "movPsitMstpSlowWrflDnon" (for example)
Unit needs to be in safe or careless mode in order to stay seated.
Description of some moves is buried here. (http://www.flashpoint1985.com/cgi-bin/ikonboard311/ikonboard.cgi?act=ST;f=71;t=55140)
You don´t have to do any sqs or sqf script files.
still not working .. i tried everything..
we plays the move and then just puts his hands next to him ..
he is in safe mode...
Dec 26 2006, 19:39
Sorry, but I don't understand what you mean.
Do you mean, that he stands up again ?
well yeah . after animation is done he stands up again and he
puts his hands next to his body . i tried it with other animations to .. same result
FOUND IT ..
ok i found solution.. i did the soldier1 setbehaviour "safe" thing in his init line.. when i add it to the trigger where the animation is executed it all goes well.. tx for the replies
Dec 26 2006, 20:00
Maybe it can help: dirty script to have some soldiers sit and watch a fire ... sorry for poor code quality.
create a file "sit.sqf":
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_unit = _this select 0;
_fireplace = _this select 1;
_unit doWatch _fireplace;
_unit setBehaviour "careless";
_unit playmove "AmovPsitMstpSlowWrflDnon_Smoking";
_unit disableAI "move";[/QUOTE]
Create a number of soldiers named soldierXX (XX is any number). Put on map a fire object named "fire";
create a MOVE waypoint for each soldier and put it nearby the fire. Place into each activation field:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
foo = [soldierXX, fire] execVM "sit.sqf";[/QUOTE]
Dec 26 2006, 21:36
I've done this too without using any scripts:
Just put in Trigger (or add this to existing one) and into "On activation" field type:
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">UnitName doWatch Object[/QUOTE]
It's not so universal, but it works http://forums.bistudio.com/oldsmileys/wink_o.gif .
smoking thing is nice .. now we need a sigrette addon
Dec 27 2006, 12:29
I second the cigarett addon. There's problems with that though.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.