Difference between revisions of "ScenEdit SetUnit"

From Baloogan Campaign Wiki
Jump to: navigation, search
(No difference)

Revision as of 09:46, 22 November 2014

<syntaxhighlight lang="lua"> --basic function: ScenEdit_SetUnit({side="United States", name="USS Test", lat = 5})


--ScenEdit_SetUnit is a function that takes something to identify a unit by; either a side/name or a guid and modifies it based on what you pass as arguments

--If you want to set the latitude of a unit, do so! ScenEdit_SetUnit({side="United States", name="USS Test", lat = 5}) --If you want to set the lat lon ScenEdit_SetUnit({side="United States", name="USS Test", lat = 5, lon = "N50.20.10"})

--Lets say you have the guid of a unit in f15.guid ScenEdit_SetUnit({guid=f15.guid, lat = 5, lon = "N50.20.10"}) --This works just as well as giving both a side and a name

--Changing the name of a unit ScenEdit_SetUnit({side="United States", name="USS Test", newname="USS Barack Obama"})

--Can change any combination of settings. Check ScenEdit_AddUnit for a full listing ScenEdit_SetUnit({side="United States", name="USS Test", heading=0, HoldPosition=1, HoldFire=1,Proficiency="Ace", Autodetectable="yes"})

</syntaxhighlight>