Home   Help Search Login Register  

Author Topic: Can Units sit on specific chair?  (Read 1925 times)

0 Members and 1 Guest are viewing this topic.

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Can Units sit on specific chair?
« on: 05 Dec 2011, 07:05:02 »
Dear folks,
              Is there any script to make a unit sit on a chair? I heard about the "switchmove" scripts,
(unit_name switchmove "FXtotable") but from this code the unit is not sitting on the specific chair, Unit is just sitting in air.
                Please help me by suggesting me any code.
                                                                 ThankXxX
 Ahmed 117
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Can Units sit on specific chair?
« Reply #1 on: 05 Dec 2011, 14:11:36 »
What chair are you using? The Chair X object is used for sitting units, the 'chair hangar' and 'chair small' are decorative and not functional items.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Can Units sit on specific chair?
« Reply #2 on: 05 Dec 2011, 14:46:19 »
Ok, then please let me know the code for chair X....
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Can Units sit on specific chair?
« Reply #3 on: 05 Dec 2011, 20:09:53 »
There's no code, it should be in the objects list with the other chair types.
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Can Units sit on specific chair?
« Reply #4 on: 06 Dec 2011, 00:55:05 »
Hey

Try this: Add a chair (Any) with namw "Chair" and then add the soldier, in his init or a script write this: soldier1 SwitchMove "Onchair" , but you have to put him on the chair, I suggest you to use this command, for example soldier1 setpos [getpos chair select 0 , getpos chair select1 , 1]

I hope it helps,
Cheers,
Aldo15
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Can Units sit on specific chair?
« Reply #5 on: 06 Dec 2011, 08:36:42 »
Ok thanks dude, I got it.But it is only applicable on "Chair X". :(
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Can Units sit on specific chair?
« Reply #6 on: 07 Dec 2011, 00:29:59 »
nope, You can use it in any chair, see u later...
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline Gruntage

  • Missions Depot
  • Administrator
  • *****
  • How do I get outta this chickensh*t outfit?
Re: Can Units sit on specific chair?
« Reply #7 on: 07 Dec 2011, 10:07:48 »
If you're using the 'switchmove 'onchair'' command and you want the person on the chair then using the 'Chair X' will produce the best results. I've tested this in the past and I've found that using the Onchair command with any other type of chair will cause the person to be sitting either on the edge of the chair, or completely away from the chair, regardless of where you position the person in the editor.

The top screenshot shows the usage of the 'switchmove Onchair' command and the 'Chair X' model. As you can see, the person is sitting perfectly on the chair, so this is the best method to use (it's also the simplest).

The bottom screenshot shows the usage of a different chair model; the 'chair hangar'. I used the 'switchmove onchair' and the setpos command and the result is the same; the person is not sitting on the chair properly.

Imo if you want the best result you should use the switchmove onchair command.

« Last Edit: 07 Dec 2011, 10:19:08 by Gruntage »
"But one thing I can tell you from not just OFP but life in general:  criticism is directly proportional to quality. The more criticism a mission receives, the better the outcome" - macguba

Offline ahmed117

  • Members
  • *
  • The 3d!t0R -=I.S.I=-
Re: Can Units sit on specific chair?
« Reply #8 on: 07 Dec 2011, 14:13:57 »
Wow... Its really working, Thankyou, gruntage. :clap:
The 3d!t0R            -=O.F.P.E.C=-                                                         -=I.S.I=-