OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: raggy99 on 14 Jan 2004, 15:59:28

Title: Air
Post by: raggy99 on 14 Jan 2004, 15:59:28
i can seem to change the weapon for a air Parashooter
i have tried
"removeallweapons this; this addweapon "m16"; this addmagazine "m16"
how ever he still seems to have the Mp5. this above works on Men Officer but not on air parashooter.

sorry about the spelling but how can i change the weapong for the parashooter to m16

thanks in advance
Title: Re:Air
Post by: m21man on 14 Jan 2004, 17:35:18
If you're doing this to the standard, guy-in-parachute unit then it would probably be:
Code: [Select]
removeallweapons (driver this); (driver this) addmagazine "m16"; (driver this) addweapon "m16"
Title: Re:Air
Post by: HuNtA on 14 Jan 2004, 17:47:53
I see the prob, your trying to add weapons to the West>air>parahute unit. U cant, u need to make an empty parachute, make a man with the weapons U want, then use MoveInDriver to get him in the parachute
Title: Re:Air
Post by: icarus_uk on 14 Jan 2004, 17:52:32
Or do it the way M21Man said.  Add the weapons to the driver, not the vehicle.
Title: Re:Air
Post by: raggy99 on 15 Jan 2004, 01:26:15
I see the prob, your trying to add weapons to the West>air>parahute unit. U cant, u need to make an empty parachute, make a man with the weapons U want, then use MoveInDriver to get him in the parachute


How do i do this???
Title: Re:Air
Post by: myke13021 on 15 Jan 2004, 01:48:55
hay

had the same prob on my actual map...do this:
create a parachute from Empty/Air (there are 4 in list, i think 1st is an East, second a west chute, at least my resistance friends shot at the first one)...name the parachute, as exemple "chute"

create a soldier, in the init field type
this assignasdriver chute; this moveindriver chute

after this, you may change any weapons you like to...

hope this works for you

edit:
i used a little script called parachute1.sqs

#place chute
_chute1 = "ParachuteWest" createVehicle getmarkerpos "chute_marker"
pl1 assignasdriver _chute1
pl1 moveindriver _chute1
_chute1 setpos [6525,8454,250]
#end
exit

then create a unit, name it pl1 (or edit the script to your choice and in the init field put: this exec "parachute1.sqs"

If you want more then 1 chute...what i guess....just replace all "1" with a "2", "3" and so on..also in script name...

i hop i didn't confused you more than necessary... ;D
Title: Re:Air
Post by: m21man on 15 Jan 2004, 03:21:10
That's getting unnecessarily complicated. Just make an empty parachute (Empty\Air), and name it (I'll use chute1 as name). Now make a guy anywhere on the map, and in his init field put this moveindriver chute1.
Title: Re:Air
Post by: myke13021 on 15 Jan 2004, 05:54:13
i agree m21man, it is more complicated than your solution (which works also fine and is easy to use) but on a MP map, if you make this on playable units and not all slots are taken, you'll have empty chutes around.  this will not affect the gameplay or cause more lag, it's just a little more "elegant"  ;)
Title: Re:Air
Post by: raggy99 on 15 Jan 2004, 06:00:01
Thanks for this info
Title: Re:Air
Post by: raggy99 on 15 Jan 2004, 06:18:14
Ony One problem i have two soldiers (i am one of them) they are grouped together. however one i use the (This moveindriver (Parachute name)). in the game they are not grouped anymore. how can i make them grouped.

thanks  
Title: Re:Air
Post by: myke13021 on 15 Jan 2004, 17:54:54
hmmm....didn't had this prob with my script...give it a try.