Reply To: Mafia 3 Modding (Mega Thread)
I want to spawn Vito near the player.
In Mafia 2, you could do this:
Vito = game.entitywrapper:GetEntityByName("Vito") Vito:SetPos(game.game:GetActivePlayer():GetPos())
In M3, this does not work, although function GetEntityByName is present: mafia3scripting.wikia.com/wiki/Game_Library
Is there any idea how this can be done?
P.S. Error description in ScriptHook.log:
Error loading Lua code into buffer. Error -100
test:2: attempt to index a nil value
test:2: in function ‘(main chunk)’
Trying to execute: Vito = game.entitywrapper:GetEntityByName(“Vito”)