2025-03-11 21:16:30 -06:00
|
|
|
require("test.lua")
|
|
|
|
|
2025-03-10 02:17:01 -06:00
|
|
|
function OnPlayUpdate(ev)
|
2025-03-11 21:16:30 -06:00
|
|
|
PrintTest()
|
2025-03-12 16:02:00 -06:00
|
|
|
if((Game.gInputPress().button & N64Buttons.BTN_L) ~= 0) then
|
2025-03-11 18:23:06 -06:00
|
|
|
local reticlePos = Game.D_display_801613E0(0)
|
|
|
|
local actorId = math.random(176, 291)
|
|
|
|
local actor = Game_SpawnActor(actorId);
|
|
|
|
|
2025-03-12 16:02:00 -06:00
|
|
|
if (actor ~= nil) then
|
2025-03-11 18:23:06 -06:00
|
|
|
actor.obj.pos.x = reticlePos.x * 1.7
|
|
|
|
actor.obj.pos.y = 200.0
|
|
|
|
actor.obj.pos.z = Game.gPlayer().pos.z - 1500.0 - (reticlePos.y * 1.7)
|
|
|
|
actor.state = 0
|
|
|
|
end
|
|
|
|
end
|
2025-03-10 02:17:01 -06:00
|
|
|
end
|
|
|
|
|
2025-03-11 18:23:06 -06:00
|
|
|
RegisterListener(Events.PlayerPreUpdateEvent, OnPlayUpdate, EventPriority.NORMAL)
|