Home   Help Search Login Register  

Author Topic: unit creation help  (Read 738 times)

0 Members and 2 Guests are viewing this topic.

garret64

  • Guest
unit creation help
« on: 14 May 2004, 21:31:32 »
Im making a script that will create 4 c130s with men in them, and i would like to have the c130s flying.

I know how to create units on the ground, then have them take off and go to waypoints, but i need help with 2 things:

1. how do you make it so those c130s will start in the air.

2. im using the HAWK c130 mod for my plane, and i cant find what name to use to create the plane -  Ive got this:

c130a = "???" createvehicle getpos gl1

but i cant find what to put as the name.

Ive tried "HWK_c130" because i saw that in the readme files, but it didnt work.

thanks
« Last Edit: 14 May 2004, 21:32:21 by SFS84 »

Unnamed

  • Guest
Re:unit creation help
« Reply #1 on: 14 May 2004, 22:16:39 »
It's easier than I thought, just create a guy and stick him on the map and name him man01. Then call something like:

Code: [Select]
Plane01="C130v2" camcreate [(GetPos Player) select 0,(GetPos Player) select 1,500] ; man01 MoveInDriver Plane01
Oh if you want to know the class name of any unit, just put this in its init field:

Code: [Select]
Hint TypeOf This

garret64

  • Guest
Re:unit creation help
« Reply #2 on: 15 May 2004, 22:12:55 »
ok, i can now create a c130 in the air with the following:

start

c130a = "C130" camcreate [(GetPos gl1) select 0,(GetPos gl1) select 1,100]
~1
"SoldierWPilot" createunit [getpos gl2, c130ag, "c130ap = this", 1, "CAPTAIN"]
~1
c130ap moveindriver c130a

exit


but, the pilot is not created and there is no pilot in the c130, so it just floats to the ground and crashes.

Unnamed

  • Guest
Re:unit creation help
« Reply #3 on: 16 May 2004, 07:02:11 »
I had to camcreate the C130 I used at least 500m above the ground, so it could get enough speed up to stop it crashing. As you have a two second delay before moving the pilot in, you will probably have to create it even higher up.

If it still crashes then the create unit command cant be working. If you remove the Moveindriver command, can you see the guy you create at the gl2 position?