Home   Help Search Login Register  

Author Topic: player out of gunner into cargo.  (Read 817 times)

0 Members and 1 Guest are viewing this topic.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
player out of gunner into cargo.
« on: 13 May 2005, 05:09:55 »
I need a script that makes the player go out of the gunner  position of a vehicle and go in the cargo of that same vehicle.

but instantly using movincargo and stuff.

I tried

player action ["eject,h1"]
~.01
player moveincargo h1
exit

but no luck

thanks

Uldics

  • Guest
Re:player out of gunner into cargo.
« Reply #1 on: 13 May 2005, 07:05:12 »
I think you have syntax error in
Quote
player action ["eject,h1"]
Try instead-->  player action ["eject",h1]

But the moveincargo command should work. Look at http://www.ofpec.com/editors/comref.php?letter=M#moveInCargo

Maybe those comments can help.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re:player out of gunner into cargo.
« Reply #2 on: 13 May 2005, 19:11:47 »
Yep, syntax definitely looks dodgy there.

However, I don't think you need to eject him first, unless you really want to.

The action command is actually movetocargo and not moveincargo.

unitname action ["movetocargo",vehiclename]

Will immediately move a unit to cargo.
If you order a pilot to do this, he will, and if the aircraft is flying it will no longer have a pilot unless there was a unit/units in cargo already, in which case they will swap positions.
         
Choppers sometimes fly erratically and even fly backwards when you swap pilots like this.

This works with player as well as AI.


Planck
« Last Edit: 13 May 2005, 19:13:22 by Planck »
I know a little about a lot, and a lot about a little.

Offline penguinman

  • Contributing Member
  • **
  • Money is worthless, just paper, ink, and threads
Re:player out of gunner into cargo.
« Reply #3 on: 13 May 2005, 23:46:13 »
ahh, I did not know about movetocargo,

thanks,

and also, if a unit is already in a vehicle you can not use the movein command on him.