Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: How let people sit on a chair?

  1. #11
    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"

  2. #12
    bump; any thoughts?

  3. #13
    Well, this would work (and does, have tested) for any unit (NPC or player), if placed in their init field:
    Code:
    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

  4. #14
    Try using this.

    Code:
    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

    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.
    Last edited by xPaveway; Jan 8 2010 at 03:36.

  5. #15
    @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.
    Last edited by TheRev709; Jan 8 2010 at 03:42.

  6. #16
    @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?
    Last edited by Minoza; Jan 30 2010 at 02:17.

  7. #17
    Anyone? Any ideas?

  8. #18
    Still nothing?

  9. #19
    First Lieutenant Manzilla's Avatar
    Join Date
    May 30 2007
    Location
    In the lab cooking up some serious s#%t!
    Posts
    5,142
    Quote Originally Posted by USRanger709 View Post
    @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?
    (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!

  10. #20
    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

    Follow our developer blog: http://hellinthepacific.blogspot.com/

Page 2 of 3 FirstFirst 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •