OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting Multiplayer => Topic started by: Malm on 11 Apr 2005, 14:43:15
-
Is it possible to change one type of unit into another type or create new units using createvehicles that followes the originally unit's waypoints?
I got a soldier with a set of waypoints that when he arrives at his wp(1) trigger a script that creates four T-55.
I want that soldier to either become assigned to or getinas commander and then have the newly spawned tanks to follow the rest of his waypoint.
Also what happens to a units waypoints after he was assigned to a group if he is deleted soon after?
"t55 = group this; this exec "delete.sqs"
delete.sqs:
~2
deletevehicle _this
Can other units be assigned to that group and what happens if you use [t55, 3] SetWpPos ... after he was deleted?
I have tried and tried but my T-55 wont move a square after they have been created !
Best regards
-Malm
-
I thought that u can only create empty vehicles, so they can not move to waypoints :(
-
Yes, createvehicle creates empty vehicles only.
You would need to create units (Using createUnit) to crew the tanks with and then get them to board as crewmen.
Planck
-
Ok sorry my fault I didn't mention that part.
:
:
"SoldierGcrew" CreateUnit [getpos _zSpawnpos, _theGrp, "", 1, "CORPORAL"]
"SoldierGcrew" CreateUnit [getpos _zSpawnpos, _theGrp, "", 1, "CORPORAL"]
_array = units _theGrp
_tank = "T55" CreateVehicle getpos _zSpawnpos
_array select _i moveindriver _tank
_array select (_i + 1) moveingunner _tank
-Malm