Home   Help Search Login Register  

Author Topic: make a unit to sit down on a bench???  (Read 509 times)

0 Members and 1 Guest are viewing this topic.

gundernak

  • Guest
make a unit to sit down on a bench???
« on: 06 Jan 2004, 00:01:40 »
hi guys,

I would like a unit to sit down to a bench and stay there, I mean I do not want him to stand up.

I tryed with these:

unitname playmove "EffectStandSitDown"

soldiername switchmove "StandToSitDown"

, but the loon do not want to sit to the bench, but to the ground and after a few sec he stands up. And these are not working in init field, only in wp.

thanks in advance

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:make a unit to sit down on a bench???
« Reply #1 on: 06 Jan 2004, 01:15:58 »
You need to loop the command using a wee script.    Here's a sketch:-

#loop
whatever
~1.5
? condition: exit
goto "loop"

I think the switchmove you want is chair or something.  It only works with one type of chair, which has to be near the loon.
Plenty of reviewed ArmA missions for you to play

GrimMonkey

  • Guest
Re:make a unit to sit down on a bench???
« Reply #2 on: 06 Jan 2004, 01:55:14 »
Try this:
Make a Trigger,
Make its axis' 0
Call it: Trig1
Put whatever condition you want that'll make the unit it
On Activation: UnitName SwitchMove "EffectStandSitDown"; Trig1=true

Make a nother trigger,
In its condition write: Trig1
In its countdown field put 2 in each,
On Activation: UnitName SwitchMove "OnChair"

Now, in your Init.sqs file, write:
Trig1=false

That's it.
Thanks to MacGuba for the trick.
Note: You can do this in a script, but it's not necessary.
Code: [Select]
UnitName SwitchMove "EffectStandSitDown"
~2
UnitName SwitchMove "OnChair"
Save above code as: Chiar

In a trigger write: This Exec "Chair.sqs"

Should be Chair X, as it's transparent, sort of.


Beware the GrimMonkey

Offline Burn

  • Members
  • *
Re:make a unit to sit down on a bench???
« Reply #3 on: 06 Jan 2004, 03:12:48 »
 :ohuh two triggers to make one loon sit down :P ;D.

Just type unitName SwitchMove "OnChair" in your init.sqs...

and if you don't know what an init.sqs is I strongly suggest you read
How to use objectives and init.sqs tutorial by snYpir, read the comments also.

Quote
UnitName SwitchMove "EffectStandSitDown"
~2
UnitName SwitchMove "OnChair"
:hmm:What are you doing with UnitName SwitchMove "EffectStandSitDown" in that script, that animation makes the loon sit down on the ground with his legs kinda crossed ;D (budha style :beat:)
Quote
Should be Chair X, as it's transparent, sort of.
Transparent?! you mean the right height?!? :-\ BTW he wanted a "bench" probably one of them res. ones ::). But I agree, the Chair X IS the best choise of furniture if you want a unit seated. ;)

[edit]
Quote
but the loon do not want to sit to the bench, but to the ground and after a few sec he stands up.
:oHe stands up???. That's never happened to me :wow:... wierd. It's allways been static for me...
« Last Edit: 06 Jan 2004, 03:24:08 by Bizon »

gundernak

  • Guest
Re:make a unit to sit down on a bench???
« Reply #4 on: 06 Jan 2004, 03:41:20 »
Actually I get it done when I looked back...but to everybody thanks very much

Weird but as I tryed to put switchMove to init field or in wp, the move was less than 0.5 sec or ended with the unit stand up.

Finally by script of course the loon could sit down, but when I pushed him from the bench, he stayed in the sitting position in the air ;D funny (even more shitting position)

So, this is not good...

I made a small script that can be started by [this] exec "sit.sqs"

Code: [Select]
_man = _this select 0

_bench = "Logic" createVehicle getpos _man

_bench setPos getPos _man

_man switchMove "OnChair"


@ _man distance _bench > 0.51


_man switchMove "FXStandFromTable"
~3
_man switchMove "CivilWalkF"


exit

It is OK now