OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: angusjm on 09 Sep 2002, 19:04:50
-
Ok, I have an C130 that drops off paratroopers and then is supposed to go away. But unfortuanatly the C130 lands at the airfield which you are assaulting which looks pretty stupid. I am only using MOVE waypoints. How do you fix this?
-
Make a WP far over the sea so that the C130 get away, and once it reaches this WP, in the activation field, put :
deleteVehicle C130Name
This will work in v 1.75 Resistance
-
I have done something similar with a this setdammage 1.0 that works, but the aircraft just lands then blows up.
-
give it an unload cargo wp - that causes a bug so it will fly straight away - over the sea and wont come back - quite funny actually...
-
No such luck.
-
deleteVehicle doesn't destroy, it deletes. The C130 will simply... vanish :) Not a single sound, no flash, nothing...
-
Yes, but the aircraft thinks that the WP means that it should land, so it lands then vanishes.
-
I think the units in the C130 are assigned with moveincargo and if you now make them jump the C130 still thinks these are "its" units and tries to get them back (a chopper will land straightly).
You've to use the assignascargo/unassign commands to get it working.
Example (initline leaderunit):
"_x moveincargo C130" foreach units group nameleader; "_x assignascargo C130" foreach units group nameleader
For the jump you've to make the units unassign the vehicle (the command is "UnassignVehicle unitname") but I'm not sure how it work's for a group!?!
I've named every parachuter and written a script with:
UnassignVehicle para1
para1 action ["eject",C130]
~1
UnassignVehicle para2
para2 action ["eject",C130]
~1
UnassignVehicle para3
para3 action ["eject",C130]
~1
...
Greetz
Plage
-
Yes, but the aircraft thinks that the WP means that it should land, so it lands then vanishes.
The aircraft lands when it has reached its last WP and has nothing more to do.
If you put your last WP far away in the sea, the aircraft will first go to this WP before coming back to land.
If in the on activation field of this WP, you delete the aircraft, it simply won't have time to go back, it will be deleted when the aircraft reaches this WP. To be sure, you can put 2 WP far away and delete the aircraft on the one before the last.
BTW, Plage remark is very true. You should first be sure that the aircraft doesn't try to get its cargo back, or it won't follow its normal WP :)
Whis'