OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Loup-Garou on 17 Feb 2004, 15:33:30

Title: Make a unit sit on a chair
Post by: Loup-Garou on 17 Feb 2004, 15:33:30
Is there a simple method to do that ? In the unit's (or object) init field ? Something as easy as giving a unit / object a specific height (this setPos [getPos this select0,getPos this select 1,1.5]) ??????  :thumbsup:
Title: Re:Make a unit sit on a chair
Post by: Loup-Garou on 17 Feb 2004, 15:39:36
Extra note : I'd like to know what to do if the chair is already (by default) in a house  ;D
Title: Re:Make a unit sit on a chair
Post by: The-Architect on 17 Feb 2004, 15:48:53
Don't think there is a chair already in a house that you can get a muppet to sit in. However there is, if I recall correctly a chair in the editor that you can just tell a guy to get in with a waypoint or have him sit in using the;

This moveindriver chair

command.
I don't know which chair it is tho. Plus you need to have downloaded the editor addon form the addon depot first.
The great Fin mod has one too.
Title: Re:Make a unit sit on a chair
Post by: h- on 17 Feb 2004, 16:18:56
unit switchMove "onChair"... (or playMove, can't remember :P)

There's only one chair that the AI is willing to sit on politely... Maybe it was chair x... The others usually need the setPos tinkering and even that won't usually help...

Is that moveInDriver even actually possible...  ???

EDIT:
Quote
Don't think there is a chair already in a house that you can get a muppet to sit in.
Actually there is... At least I've dunnit succesfully in the (CWC age) restaurant building...
Title: Re:Make a unit sit on a chair
Post by: Loup-Garou on 17 Feb 2004, 21:58:45
The house I mentioned is a white one, in Trosky (Novoga). I've already fit up it with a computer, a phone, a steel bed and a radio (did I hear : space problem ?)  ;D
Title: Re:Make a unit sit on a chair
Post by: Loup-Garou on 17 Feb 2004, 22:53:48
OOOpppppssss.... . Nothing work :help:
Title: Re:Make a unit sit on a chair
Post by: macguba on 18 Feb 2004, 01:05:23
HateR_Kint's solution does work.   Try harder.

You need to check the syntax of the command and ensure that you have the correct chair.    You may need to adjust the positions of the chair and the loon a little.
Title: Re:Make a unit sit on a chair
Post by: Loup-Garou on 19 Feb 2004, 14:52:23
I tried all of the chairs, playMove and switchMove.... but that @x!!   :gunman: civilian just turns his head !!!!
Title: Re:Make a unit sit on a chair
Post by: h- on 19 Feb 2004, 17:58:46
Yes it does work... I tried it myself just now...

Let me guess: You tried to put the command in the units init field?
Now, don't do that... It will not work in 9.9999989 times out of 9.999999...

Use a trigger or a script instead...
Use it as unit switchMove "onChair" and with Chair X which seems to be the only one that seems to accept to be sitted on...
Title: Re:Make a unit sit on a chair
Post by: Kaliyuga on 19 Feb 2004, 20:07:04
  That moveindriver thing is a good idea..  ;D

but it's only the chairs for the FDF mod that have it AFAIK...

 I could probably make a simple little wooden desk chair that has the same properties though..  

think it would get used much?

:cheers:
Title: Re:Make a unit sit on a chair
Post by: Loup-Garou on 20 Feb 2004, 22:08:04
Thanks, HateR_Kint  ;) . You're right ! I used a trigger and it worked !

Example : unit : civilian, name : Civ1. Linked (F2) with a trigger: on Activation : Civ1 switchMove "OnChair"

Note : as you said, it works fine with ChairX ; but it might be working with other chair types, because seems the animation works even without a chair (lol). Perhaps with some trick like getPost (ajust the chair's height...).
Anyway, topic is SOLVED ! Thanks again  :thumbsup: !