Jump to content

Photo
- - - - -

How let people sit on a chair?


  • Please log in to reply
20 replies to this topic
AAD10 Pete
AAD10 Pete

    Sergeant

  • Members
  • 123 posts

#1

Posted 20 September 2009 - 14:45

Hi guys

What do I have to do to let people, from the beginning of a mission, sit on a chair.
For example like the people in the briefing room in one of the first mission of the campaign who all are sitting on their chairs and listen to the commanders briefing.

If I give the right animation to the people, they sit too high in the air and pull automatically away the chair-object...

Any other possibilities to let people sit on a chair from the beginning of a mission?

Thanks for your help
Greetings,

Pete
Clanleader
http://aad10gameclan.enjin.com

shanawa
shanawa

    Lance Corporal

  • Members
  • 41 posts

#2

Posted 20 September 2009 - 23:33

Ya I noticed that as well. Most likely you will have to use attachto

I haven't messed with it yet but there's lots of posts on it.


Example scripts that use the attachTo command


PuFu
PuFu

    Poly Bully

  • Members
  • 7212 posts

#3

Posted 21 September 2009 - 00:09

using switchMove rather than attachTo.
you should try this one....
sitUnarm_L_idleLoop_inUH1Y

this is a (incomplete) list of know A2 animations:
http://community.bis...ki/ArmA2:_Moves

Posted Image


AAD10 Pete
AAD10 Pete

    Sergeant

  • Members
  • 123 posts

#4

Posted 21 September 2009 - 06:16

@pufu:
Thats exactly what I did but with this way it doesn't seem possible.

@shanawa:
thx, I will try that out.
Greetings,

Pete
Clanleader
http://aad10gameclan.enjin.com

PuFu
PuFu

    Poly Bully

  • Members
  • 7212 posts

#5

Posted 21 September 2009 - 11:57

@pufu:
Thats exactly what I did but with this way it doesn't seem possible.

@shanawa:
thx, I will try that out.


I am sure it is possible if you got the proper animation. Which you probably don't and unfortunately cannot direct you to it (as i don't know the sit on chair anim)

Posted Image


rejenorst
rejenorst

    Gunnery Sergeant

  • Members
  • 403 posts

#6

Posted 21 September 2009 - 12:02

Both work but switchto command for the animation you will have to have the right anim or the player/ unit will slide off the chair/push the chair away.

If you placed the chair urself via an object I would use the attachto command and the switchmove command and when the unit has to get up I would use unit1 attachto [unit1,[0,0,0]]; and unit1 switchmove ""

JamesF1
JamesF1

    Staff Sergeant

  • Members
  • 230 posts

#7

Posted 21 September 2009 - 13:38

There's a chair vehicle that you can use moveInCargo on. E.g.:
myChair = "FoldChair_with_Cargo" createVehicle getPos player;
player moveInCargo myChair;

Want a casual but realistic Arma experience? Join HMM Squad!
OFPEC - The Editing Center
JamesBurgess.co.uk

AgentD
AgentD

    Private First Class

  • Members
  • 16 posts

#8

Posted 21 September 2009 - 13:45

There's a chair vehicle that you can use moveInCargo on. E.g.:

myChair = "FoldChair_with_Cargo" createVehicle getPos player;
player moveInCargo myChair;


Ha! My inability to perform this simple task has been putting a real downer on my editing time. I must have spent 3 hours fiddling with animations and attachto...

Many many thanks.
Q6600 @ 3.4 // 2x 2GB Dominator @ 1066 // 9800GTX+

TheRev709
TheRev709

    Master Sergeant

  • Members
  • 735 posts

#9

Posted 05 January 2010 - 23:16

There's a chair vehicle that you can use moveInCargo on. E.g.:

myChair = "FoldChair_with_Cargo" createVehicle getPos player;
player moveInCargo myChair;


forgive my noobness but . . .
is this a script or what? where do i put this code?

JamesF1
JamesF1

    Staff Sergeant

  • Members
  • 230 posts

#10

Posted 06 January 2010 - 00:01

That's a script to create the chair, and move the player into the chair. If you put that in the player's init box (in the editor), it would create a chair at the player's position, and put the player in it.
Want a casual but realistic Arma experience? Join HMM Squad!
OFPEC - The Editing Center
JamesBurgess.co.uk

TheRev709
TheRev709

    Master Sergeant

  • Members
  • 735 posts

#11

Posted 06 January 2010 - 02:04

I tried it in an NPC's init and it didn't work. I tried changing the "player" to "co1" (what i named the NPC, and "this"

TheRev709
TheRev709

    Master Sergeant

  • Members
  • 735 posts

#12

Posted 07 January 2010 - 17:37

bump; any thoughts?

JamesF1
JamesF1

    Staff Sergeant

  • Members
  • 230 posts

#13

Posted 07 January 2010 - 21:06

Well, this would work (and does, have tested) for any unit (NPC or player), if placed in their init field:
myChair = "FoldChair_with_Cargo" createVehicle getPos this;
this moveInCargo myChair;

Want a casual but realistic Arma experience? Join HMM Squad!
OFPEC - The Editing Center
JamesBurgess.co.uk

xPaveway
xPaveway

    Sergeant

  • Members
  • 115 posts

#14

Posted 08 January 2010 - 04:19

Try using this.

this disableAI "MOVE"; 
removeAllWeapons this; 
this switchMove "sitUnarm_L_relaxing";  
this setPos (getPos chair1); 
this setDir (getDir chair1 - 90);

Where actor is some unit such as a rifleman and chair1 is a folding chair placed in the editor.

I put that script in the "init" field on the "actor" rifleman, works like a charm. The hard part would be getting smooth transitions to walking around and sitting down etc :D

Edit: setDir is not behaving well, the unit seems to like to turn to his own direction, fixed with disableAI "MOVE". The -90 degrees on the direction is due to the animation being rotated 90 degrees from the unit's forward direction.

Edited by xPaveway, 08 January 2010 - 04:36.


TheRev709
TheRev709

    Master Sergeant

  • Members
  • 735 posts

#15

Posted 08 January 2010 - 04:37

@JamesF1 - worked like a charm! . . . except the person/chair is always ending up in a random spot facing a random direction rather than the original direction of the character.

@xPaveway - also worked like a charm! ... the first time, but now when I try it the person sitting in the chair is not facing the correct way. I've double checked the code but its all the same as it was before (just copied and pasted, changed the names of the person/chair).

Edit: ok . . . I got it workin Paveway, only I had to set the character's initial direction 100 degrees different from the direction of the folding chair.

Edited by TheRev709, 08 January 2010 - 04:42.


Minoza
Minoza

    Master Sergeant

  • Members
  • 798 posts

#16

Posted 30 January 2010 - 03:15

@xPaveway

Your method worked great. There is one problem though... for some reason AI character stands up to salute after some time and wont sit back again...

Any workaround?



I'm sorry, it seems that this actually happens only when you ''greet'' him. Few seconds later he stands up and saluts, after that he wont sit again...

would loop solve it?

Then I would have to use while {true} do... but I have no idea how to set it up so that it works... Can someone write that code for me?

Or any better suggestions? Not to ''greet'' him lol?

Edited by Minoza, 30 January 2010 - 03:17.


Minoza
Minoza

    Master Sergeant

  • Members
  • 798 posts

#17

Posted 31 January 2010 - 04:54

Anyone? Any ideas?

Minoza
Minoza

    Master Sergeant

  • Members
  • 798 posts

#18

Posted 03 February 2010 - 01:51

Still nothing? :(

Manzilla
Manzilla

    First Lieutenant

  • Members
  • 5142 posts

#19

Posted 04 September 2010 - 21:53

@JamesF1 - worked like a charm! . . . except the person/chair is always ending up in a random spot facing a random direction rather than the original direction of the character.

@xPaveway - also worked like a charm! ... the first time, but now when I try it the person sitting in the chair is not facing the correct way. I've double checked the code but its all the same as it was before (just copied and pasted, changed the names of the person/chair).

Edit: ok . . . I got it workin Paveway, only I had to set the character's initial direction 100 degrees different from the direction of the folding chair.


I still have this occurring. I tried adjusting the number but the chair and unit still are at 90 degree angle from each other. Is there a work around?
:coop: :yay::yay::yay: (God damn bananas..... again)

Join the most rootin', tootin'est crew on these here forums! That's right folks we're darn tootin'.

Mike Tyson's ode to Manzilla's SP playing style:

My style is impetuous. My defense is impregnable and I'm just ferocious.... I want your heart, I want to eat his children! Praise be to Allah!


M.Evans
M.Evans

    Sergeant

  • Members
  • 130 posts

#20

Posted 23 July 2011 - 17:14

Hey, i am having a relatively similar issue, only I would like the player to have the scroll option to "sit in Chair." The final product would be a player walking up to the chair pressing sit in chair then sitting, then while sitting have the option to get out of the chair...any ideas?
HITP Developer/ 2d Artist
Posted Image
Follow our developer blog: http://hellinthepacific.blogspot.com/