OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: shark attack on 24 Jan 2004, 12:06:18

Title: giving names to created vehicles
Post by: shark attack on 24 Jan 2004, 12:06:18
i have a reliable script for creating vehicles my problem is how would i give the t80 a name  eg  tank1  


_type = "T80"
_pos = getpos START  (gamelogic)
_group = red1

_obj = _type createVehicle  [0,0,0]
_obj setpos [_pos select 0, _pos select 1, (_pos select 2) + 00]
~.01
"SoldierE" createUnit [_pos, _group, "Soldier = this"]
Soldier moveInDriver _obj
"SoldierE" createUnit [_pos, _group, "Soldier = this"]
Soldier moveInGunner _obj
"SoldierE" createUnit [_pos, _group, "Soldier = this"]
Soldier moveInCommander _obj

i find the script works well  only having to change the _type to create any vehicle  but without names its dificult to create triggers around the units involved  ie (tank1 not alive)


thanx in advance

shark attack
Title: Re:giving names to created vehicles
Post by: Artak on 24 Jan 2004, 13:05:13
substitute _obj with tank1
Title: Re:giving names to created vehicles
Post by: shark attack on 24 Jan 2004, 13:10:56
lol    that easy .......

thanx mate!