I'm trying to run the following code:
Using Bribe's global initialization for LUA. Output prints the string as excepted but does not spawn any unit. Any idea?
Code:
function SpawnerActions()
print "I am a test string."
CreateNUnitsAtLoc(1, "hfoo", Player(0), GetRectCenter(GetPlayableMapRect()), bj_UNIT_FACING )
end
onTriggerInit(function ()
Spawner = CreateTrigger()
TriggerRegisterTimerEventPeriodic(Spawner, 2)
TriggerAddAction(Spawner, SpawnerActions)
end)
Using Bribe's global initialization for LUA. Output prints the string as excepted but does not spawn any unit. Any idea?