Forged Alliance Forever Forged Alliance Forever Forums 2016-12-12T19:56:19+02:00 /feed.php?f=53&t=13646 2016-12-12T19:56:19+02:00 2016-12-12T19:56:19+02:00 /viewtopic.php?t=13646&p=140428#p140428 <![CDATA[Re: Spawning units with a script]]> Statistics: Posted by TREEMAN — 12 Dec 2016, 19:56


]]>
2016-12-12T09:01:10+02:00 2016-12-12T09:01:10+02:00 /viewtopic.php?t=13646&p=140402#p140402 <![CDATA[Re: Spawning units with a script]]>
This works:
Code:
local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')

function OnPopulate()
   ScenarioUtils.InitializeArmies()
   SpawnUnit()
end

function OnStart(self)
end

function SpawnUnit()
   local spawn = CreateUnitHPR('urb0101', 'NEUTRAL_CIVILIAN', Random(40,50), 25.984375, Random(40,50), 0,0,0)
end

Statistics: Posted by speed2 — 12 Dec 2016, 09:01


]]>
2016-12-12T07:10:13+02:00 2016-12-12T07:10:13+02:00 /viewtopic.php?t=13646&p=140400#p140400 <![CDATA[Re: Spawning units with a script]]> local ScenarioUtils = import('/lua/sim/ScenarioUtilities.lua')

function OnPopulate()
ScenarioUtils.InitializeArmies();
SpawnUnit();
end

function OnStart(self)
end

function SpawnUnit()
local spawn = CreateUnitHPR("URB0101", "NEUTRAL_CIVILIAN", Random(312,492), 25.984375, Random(312,492), 0,0,0);
end

Statistics: Posted by TREEMAN — 12 Dec 2016, 07:10


]]>
2016-12-12T00:43:36+02:00 2016-12-12T00:43:36+02:00 /viewtopic.php?t=13646&p=140388#p140388 <![CDATA[Re: Spawning units with a script]]> Statistics: Posted by TREEMAN — 12 Dec 2016, 00:43


]]>
2016-12-12T00:38:48+02:00 2016-12-12T00:38:48+02:00 /viewtopic.php?t=13646&p=140387#p140387 <![CDATA[Re: Spawning units with a script]]>
Need to see some code snippets, or even your entire map.
Can't exactly give feedback when I don't know what you're trying to do.

Statistics: Posted by KeyBlue — 12 Dec 2016, 00:38


]]>
2016-12-12T00:25:30+02:00 2016-12-12T00:25:30+02:00 /viewtopic.php?t=13646&p=140386#p140386 <![CDATA[Spawning units with a script]]> Statistics: Posted by TREEMAN — 12 Dec 2016, 00:25


]]>