OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Pipski on 27 Jan 2004, 13:12:57

Title: Stop standing up you little ****!
Post by: Pipski on 27 Jan 2004, 13:12:57
Can anyone tell me how to get a unit to start the mission sitting down AND STAY SAT DOWN UNTIL I TELL HIM TO GET UP?  EffectStandSitDown and EffectStandSitDownStay both get them to take a seat for a few seconds but then they get up for no adequately explored reason.  Muchos gracias.
Title: Re:Stop standing up you little ****!
Post by: macguba on 27 Jan 2004, 13:31:13
I had a problem with that.     You could try looping the switchmove.    However,  I suspect there is some hard coding behind it:  I solved it by having several loons sitting and experimenting with their exact positions.  Eventually I got it so that their behaviour of them was predictable.  If I remember rightly whether or not a loon stands up partly depends on whether there is another loon sitting next to him, or standingn next to him.  

One of them even walked away a few yards.  I couldn't fix that so I made it a feature.   ;D
Title: Re:Stop standing up you little ****!
Post by: Pipski on 27 Jan 2004, 13:33:42
Nuts.  Oh well, it doesn't matter too much, he gets napalmed within the first half minute anyway.    :D  Cheers Mac.
Title: Re:Stop standing up you little ****!
Post by: dalton on 27 Jan 2004, 13:40:37
well i have the 1 for pushups but it looks kind of weird

#loop
_dude1 switchmove "fxstanddip"
~3
goto "loop"
exit


u can just change it to sitting instead of pushups. but not totally sure if it will work
Title: Re:Stop standing up you little ****!
Post by: h- on 27 Jan 2004, 14:12:18
 ???

Never had any problems of that kind with switchMove... Unless the unit switchMoved is grouped with somebody...

In that case u need to doStop the unit before switchMovin'...

If I'm barking at the wrong tree, just shove me off...  ;D
:beat:
Title: Re:Stop standing up you little ****!
Post by: Welshmanizer on 27 Jan 2004, 22:05:43
I seem to remember using unit switchMove "EffectStandSitDownStill" to make someone sit permenantly. They will be 'frozen' in this one position, but they will definitely stay there.


Title: Re:Stop standing up you little ****!
Post by: Pipski on 27 Jan 2004, 23:32:38
I tried that but the wretched sod still stood up again!  I sort of assumed that was what Effect...Still was for but it didn't work for me.  Nothin ever works for me   :'(
Title: Re:Stop standing up you little ****!
Post by: Welshmanizer on 27 Jan 2004, 23:34:34
Hmm, I'm sure that worked for me... :-\
Title: Re:Stop standing up you little ****!
Post by: Welshmanizer on 27 Jan 2004, 23:40:17
Wait a minute, it DOES work. Remember if you put this switchMove "EffectStandSitDownStill" in the unit's init field, it wont work. You have to name the soldiers and use a trigger:

Cond: true
On Activation: unitname switchMove "EffectStandSitDownStill"; unitname2 switchMove "EffectStandSitDownStill"

It works - I have just done it.
Title: Re:Stop standing up you little ****!
Post by: General Barron on 28 Jan 2004, 08:36:49
Try using this:

unit disableAI "MOVE"

It may help. Also try setting their behaviour to "CARELESS"
Title: Re:Stop standing up you little ****!
Post by: Burn on 28 Jan 2004, 10:53:20
Do you need to control the unit later or is he just a static unit to give some atmosphere to the mission\intro\cutscene ??? I.E. is he grouped to you :-\

Because it's alitle confusing when u first write:
Quote
...start the mission sitting down AND STAY SAT DOWN UNTIL I TELL HIM TO GET UP?
and then:
Quote
Oh well, it doesn't matter too much, he gets napalmed within the first half minute anyway.
:P ;D ::)

Well if he's just a static loon then use DisableAI, but if you need to control him, then use dostop and perhaps switchUnitPos "down" or something like that, because u can't enableAI after u've disabled it.

And also, are u writing this in the init field or in a script like init.sqs?!?
If in the init field use setbehaviour "safe" to make it work,
if your using init.sqs you shouldn't have to make his behaviour safe.

The reason the L00ns stand up is the collision detection system in OFP,
I.E. you place em' too close to eachother n' they start to feel crowded => then walk away ::)...
the same "bug" or limitation (whatever u want to call it) afects the loons if u shoot em' when they are performing certain animations, e.g. "fxExecution"... so when u execute a loon that's in the midle of the animation he suddenly stands up like in an afterdeath spasm or sumthin' instead of falling smoothly too the ground like he should :o >:( :P. But it shouldn't affect ALL animations just some of em'.

But the dostop thingy or disableAI should work, if not then don't place them so close to each other or any object. :P

G.Luck mate ;) :cheers:
Title: Re:Stop standing up you little ****!
Post by: Pipski on 28 Jan 2004, 11:40:36
Ah, I think the prob was that I was trying to run it from the Init rather than from a Trigger.  Didn't think of that!  Muchos gracias for all the suggestions fellers.