OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Urbanebula on 23 Jul 2004, 10:42:51

Title: Sit the f**k down!
Post by: Urbanebula on 23 Jul 2004, 10:42:51
How do i get soldiers to sit down and clean their weapons like in one of the intros? Oh and you can do it yourself but nobody else does.
Title: Re:Sit the f**k down!
Post by: Messiah on 23 Jul 2004, 10:53:10
unitname playmove "effectstandsitdown"
Title: Re:Sit the f**k down!
Post by: Peter_Bullet on 23 Jul 2004, 13:28:45
Hey, I tried that once, but I have a problem with it... The units got up pretty soon after they had sat down, is there a way to fix this? Or do I have to script it to repeat the move?  ???

Thanx!
Title: Re:Sit the f**k down!
Post by: DBR_ONIX on 23 Jul 2004, 14:16:50
Then just look unit switchmove "effectstandsitdown" with a delay of about 1 seconds (~1) in a script
- Ben
Title: Re:Sit the f**k down!
Post by: Messiah on 23 Jul 2004, 15:30:52
try setting them to safe or careless as well  ;)
Title: Re:Sit the f**k down!
Post by: h- on 23 Jul 2004, 15:41:10
I have never needed any loops... But triggers or script would work more reliably than init line...

and mode 'safe' will be just fine...

If the units you are trying to get to sit down belong to a group, you must set their 'special' to 'none' instead of 'in formation' and then doStop the units before using the "effectStandSitDown"...

Otherwise they just jump up because they start to form the formation they are set in...
Title: Re:Sit the f**k down!
Post by: CopyrightPhilly on 23 Jul 2004, 16:16:40
ok make a sqs file call it sumthing like sitdown.sqs

now in there put:

Code: [Select]
_unit=_this select 0

#loop
_unit switchmove "effectstandsitdown"
~3
goto "loop"
exit;
now in the soldiers init that you want to sit down put:

Code: [Select]
[this] exec "sitdown.sqs"
you can put that in as many soldiers as you wish

Hope this helps

cheers, Philly
Title: Re:Sit the f**k down!
Post by: Dubieman on 23 Jul 2004, 17:03:52
With that script how do the soldiers get up? Are they going to be stuck in lazy sleep and sit mode all day?

Put another check in there, like radioaplha = true: goto "getup"... ::)
Title: Re:Sit the f**k down!
Post by: CopyrightPhilly on 23 Jul 2004, 17:21:46
pmsl

ok use this

Code: [Select]
_unit=_this select 0

#loop
?standup=true:goto "end"
_unit switchmove "effectstandsitdown"
~3
goto "loop"

#end
exit;


so when u want to make then stand up, put:

standup=true

in the trigger/waypoint activation
Title: Re:Sit the f**k down!
Post by: Blanco on 23 Jul 2004, 20:46:03
Hi, try this

Code: [Select]
Unitname action ["sitdown"]

And they wont stand up, unless they feel hostile presence...

Title: Re:Sit the f**k down!
Post by: Peter_Bullet on 24 Jul 2004, 08:02:03
Thanks quys! That's the way I would have scripted it! Though I tried putting them careless or safe, and it didn't help... but I think that DoStop works....

Thanks alot! :D