ScenEdit AddUnit

From Baloogan Campaign Wiki
Revision as of 10:02, 22 November 2014 by Baloogan (talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

<syntaxhighlight lang="lua"> --basic function: newship = ScenEdit_AddUnit({type="Ship", name = "USS Test", side = "United States", DBID = 1023, Latitude = "S 50.23.41", Longitude = 5.2}) print(newship.guid) -- prints the ship's unique id


--advanced function: newship = ScenEdit_AddUnit({type="Ship", name = "USS Test", side = "United States", DBID = 1023, Latitude = "S 50.23.41", Longitude = 5.2})

--Type: Can be one of the following: Ship, Submarine, Aircraft, Facility --For Type: Sub, Air, Land are also valid.

--Name: Can be any string

--Side: Can be any side's name. 'PlayerSide' is a special value that will evaluate to the player's side

--DBID: Database id

--Latitude: Can be a string with a number in it ("5.1"), a number (5.1), or a latitude string specifying degrees minutes and seconds "S 50.23.41" --Longitude: Can be a string with a number in it ("5.1"), a number (5.1), or a latitude string specifying degrees minutes and seconds "S 50.23.41" --For Latitude and Longitude: Lat, Lon, Long, are all valid ways to input Latitude and longitude.

--Altitude:


</syntaxhighlight>