Reply To: LUA script (Entity)
Home / Forums / Modders Corner / Mafia Editing / Mafia II mods / LUA script (Entity) / Reply To: LUA script (Entity)
It is normal that it does not work.
in your script, all command is activated directly. one after the other but very quickly.
But StreamMapLine activation requires some time to be fully activated before activation NPC.
test this : NPC activation is effected three seconds after
game.sds:ActivateStreamMapLine(“fr_bomber_m01_load”)
DelayBuffer:Insert(function(l_1_0)
game.entitywrapper:GetEntityByName(“enemy1”):Activate()
game.entitywrapper:GetEntityByName(“enemy1”):SetPos(Math:newVector( -1315, 1005,-19))
game.entitywrapper:GetEntityByName(“enemy1”):SetDir(Math:newVector( 0,-1,0))
game.entitywrapper:GetEntityByName(“enemy1”):InventoryAddWeapon(5,92)
game.entitywrapper:GetEntityByName(“enemy1”):Attack(game.game:GetActivePlayer())
end,{l_1_0},3000,1,false)
