1 2
7 8
Player (170)
Joined: 7/1/2016
Posts: 263
Sorry. I'm to stupid. Still can't understand how to do it. Look what i make. It really close to work properly:
while (true) do

	x1 = memory.readbyte(0x0401) - memory.readbyte(0x00FD);
	if x1 > 0
		then x1 = memory.readbyte(0x0401) - memory.readbyte(0x00FD);
		else x1 = memory.readbyte(0x0401) + 255 - memory.readbyte(0x00FD);
	end;

	y1 = memory.readbyte(0x0400) - memory.readbyte(0x00FC);
	if y1 > 0
		then y1 = memory.readbyte(0x0400) - memory.readbyte(0x00FC);
		else y1 = memory.readbyte(0x0400) + 239 - memory.readbyte(0x00FC);
	end;

	gui.text(x1,y1, 0);

emu.frameadvance();
end;
But when enemies go off screen: Don't know how to make it better edit: oh. Actually... That's ok for me. But if someone one wanna help to make it perfect - feel free to do that. But don't worry to much.
Site Admin, Skilled player (1236)
Joined: 4/17/2010
Posts: 11264
Location: RU
Look what I found though http://retroshift.wikidot.com/local--files/scripts/metroidlua.zip (I tried to fix your script and this game's RAM is a complete mess)
Warning: When making decisions, I try to collect as much data as possible before actually deciding. I try to abstract away and see the principles behind real world events and people's opinions. I try to generalize them and turn into something clear and reusable. I hate depending on unpredictable and having to make lottery guesses. Any problem can be solved by systems thinking and acting.
Joined: 12/28/2016
Posts: 26
Location: United States
can someone give me a tutorial for this?
This account is rarely used nowadays, ignore any dumb posts from here from a while ago.
Player (149)
Joined: 5/25/2015
Posts: 49
sullyrox wrote:
can someone give me a tutorial for this?
http://tasvideos.org/LuaScripting.html
jmosx36
He/Him
Player (123)
Joined: 12/7/2013
Posts: 98
Location: Colombia
HI, i have a question. I'm trying to make a little lua script to show some RAM values on screen without the external RAM watch tool, so there's any way to show the lua drawings away of the game screen?
Currently making a route for Super Bomberman 5 200% TASes i'm planning: aero fighters, tg3000 (again), gradius 3, bust a move, bust a move plus, gradius rebirth, smg, smg2, mp9, gh3 (wii)
1 2
7 8