Forum rules
Before you make a topic/post, consider the following:
-Is there a topic for this already?
-Is your post on topic/appropriate?
-Are you posting in the right forum/following the forum rules?
yoshiegg wrote:Nice Work, Dude. You showed us a new possibility to create custom powerups without overwring existing ones.
This has always been possible but not without some hackery involved. Before we introduce new basegame powerups, we plan to ensure the methods for doing so are neat and polished, such that the visible difference between vanilla powerups and lua ones is minimised.
yoshiegg wrote:Nice Work, Dude. You showed us a new possibility to create custom powerups without overwring existing ones.
This has always been possible but not without some hackery involved. Before we introduce new basegame powerups, we plan to ensure the methods for doing so are neat and polished, such that the visible difference between vanilla powerups and lua ones is minimised.
Enjl wrote:Didn't the balls bounce off coins in Super Mario Land?
Sometimes they did, sometimes they didn't. It wasn't easy at all to tell which direction the ball would go after hitting a coin, especially in that one underground bonus room that was literally all coins (see the 4:30 mark here):
local BoomerangLock = 0
function onTick()
if player.powerup == PLAYER_HAMMER then
if BoomerangLock == 0 then
if(player.runKeyPressing) then
for k,v in pairs(NPC.get(171,-1)) do
v.id = 292
v.width = 32
v.height = 32
v:mem(0x110,FIELD_DFLOAT,1)
if BoomerangLock == 0 then
if player:mem(0x106,FIELD_WORD) ~= -1 then
BoomerangLock = 0
v.x = v.x + 2
v.speedX = 25
v.speedY = -10
else
v.x = v.x - 2
v.speedX = -25
v.speedY = -10
BoomerangLock = 0
end
else
local BoomerangCheck = NPC.get(292,-1)
if table.getn(BoomerangCheck) == 0 then
BoomerangLock = 0
else
player:mem(0x160,FIELD_WORD,2)
end
end
end
end
end
end
end
end
The only problem with this is that it doesn't work for Peach.