Page 1 of 1

Disabling alternate powerups

Posted: Tue Oct 05, 2021 5:53 pm
by TheNightingale
Yeah, just a simple question. How can I make the player unable to drop items from the item box in the top?

It's probably an easy thing to do but I have absolutely no experience with lua (just a little bit I guess?)

Re: Disabling alternate powerups

Posted: Tue Oct 05, 2021 6:51 pm
by Hoeloe

Code: Select all

function onTickEnd()
    player.reservePowerup = 0
end
This will just empty out the reserve powerup as soon as it gets filled.

Re: Disabling alternate powerups

Posted: Tue Oct 05, 2021 7:09 pm
by TheNightingale
Hoeloe wrote:
Tue Oct 05, 2021 6:51 pm

Code: Select all

function onTickEnd()
    player.reservePowerup = 0
end
This will just empty out the reserve powerup as soon as it gets filled.
Thank you so much. I will have to play more around lua stuff heh

Re: Disabling alternate powerups

Posted: Thu Aug 04, 2022 9:11 am
by BrokenAce
Hoeloe wrote:
Tue Oct 05, 2021 6:51 pm

Code: Select all

function onTickEnd()
    player.reservePowerup = 0
end
This will just empty out the reserve powerup as soon as it gets filled.

This is really great. Any way to get it working for both players in multiplayer mode? Player 2 can still use reserve items with this code.

Re: Disabling alternate powerups

Posted: Thu Aug 04, 2022 9:15 am
by deice
BrokenAce wrote:
Thu Aug 04, 2022 9:11 am
This is really great. Any way to get it working for both players in multiplayer mode? Player 2 can still use reserve items with this code.
simply add the following:

Code: Select all

if(player2) then 
	player2.reservePowerup = 0
end