OFPEC Forum

Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Ironman on 22 Feb 2009, 16:46:15

Title: Sitting a Unit in a chair
Post by: Ironman on 22 Feb 2009, 16:46:15
In the campaing there are always reports coming from the TV studio that show a person sitting in the chair. I was wondering if any of you knew how to do this. I have searched and seen no related items for ArmA.
Title: Re: Sitting a Unit in a chair
Post by: Planck on 22 Feb 2009, 17:13:24
There's a chair in arma?


Planck
Title: Re: Sitting a Unit in a chair
Post by: johnnyboy on 22 Feb 2009, 19:01:00
Chairs don't seem to have a solid enough surface to sit a unit in--when setposed onto a chair, the units fall through it or slide off it.  But they will sit on benches, and other objects (tailgate of truck, wall, etc.).  You have to experiment.

I put the following code in a Talk waypoint for a unit to get him to sit on a bench (see first pic):

Code: [Select]
dostop this; this switchmove "Truck_Cargo02";  this setpos (chairA modelToWorld [-.3,-.1,1.3]); this dowatch (this modelToWorld [0,20,30]);
It's the cargo animations called by switchmove that give you a sitting animation.  There are many to choose from.  You then SETPOS the unit relative to the object.  In the above case I placed a bench (Sitbank 1 object) and named it chairA.

The second pic shows 3 guys sitting on an ammobox using two cargo animations and the "AH6_Gunner" gunner animation (the guy holding his wanker).

The move animations can be found here:

http://community.bistudio.com/wiki/Armed_Assault:_Moves_List#Acts...

One TV man sitting animation is:  "ActsPercMstpSnonWnonDnon_MarianQ_TVstudioMan_Loop1"
Title: Re: Sitting a Unit in a chair
Post by: Ext3rmin4tor on 22 Feb 2009, 20:34:46
I'm just curious: I've never used modelToWorld but is the model coordinate system the same used for setRelPos command in cinematics, that is Y-Axis direction along the object direction, the X-Axis ortogonal to Y and right-handed, and Z is the height from the model center?
Title: Re: Sitting a Unit in a chair
Post by: Mandoble on 22 Feb 2009, 21:03:38
Yes Ext3rmin4tor.
Title: Re: Sitting a Unit in a chair
Post by: Worldeater on 22 Feb 2009, 21:12:08
@Plank:
There are even four chairs (\ca\buildings\furniture\ch_mod_*). They aren't configured, though. So you need something like LowFly's Editorupdate to "unlock" them.
Title: Re: Sitting a Unit in a chair
Post by: Ironman on 23 Feb 2009, 08:01:40
Did you guys ever use the TV studio for anything then? It is unlocked by LowFly's editor update...... It is the news room seen in the campaign cutscenes..... That is where I want the reporter to sit... Those cargo animations dont look to promising but I will look into it.... thanks for the feedback so far.
Title: Re: Sitting a Unit in a chair
Post by: Planck on 23 Feb 2009, 15:44:06
Ah yes the "TVStudio", you can create one of those any time with createVehicle and the aforementioned classname.

Looking at it, the chair is a little close to the desk to be able to sit someone in it.

@WorldEater
Thanks, never bothered to see what the ch_mod things were, I did know there were no chairs in the configs though.


Planck
Title: Re: Sitting a Unit in a chair
Post by: johnnyboy on 23 Feb 2009, 19:50:02
Once you have the studio placed, I believe you will still need a switchmove animation. 

Like I said in the earlier post, this is one of those TV man animations:

"ActsPercMstpSnonWnonDnon_MarianQ_TVstudioMan_Loop1"

How you position the guy in the studio may be trial and error to find the right spot.  If you unpbo the campaign, you could find their exact method for the TV news scenes.
Title: Re: Sitting a Unit in a chair
Post by: Ironman on 24 Feb 2009, 01:03:34
thank you johnny