Skip to content

Instantly share code, notes, and snippets.

@thebecwar
Created September 2, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thebecwar/34c5e3678964472025a7f5232a09ecea to your computer and use it in GitHub Desktop.
Save thebecwar/34c5e3678964472025a7f5232a09ecea to your computer and use it in GitHub Desktop.
Enemy, Secret, and Pickup counter for Batman Forever (SNES)
-- Config Params:
local XPos = 0
local YPos = 0
local Anchor = "bottomleft"
-- Script Starts Here
local enemies -- 01FFC8 - Enemy Counter
local pickups -- 01FFD0 - Pickup Counter
local secrets -- 01FFC0 - Secret Counter
while true do
enemies = mainmemory.read_u16_le(0x01FFC8)
pickups = mainmemory.read_u16_le(0x01FFD0)
secrets = mainmemory.read_u16_le(0x01FFC0)
gui.text(XPos, YPos, "P1 - E: " .. enemies .. " P: " .. pickups .. " S: " .. secrets, null, Anchor)
emu.frameadvance()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment