Page 1 of 1

Speed Shroom.lua

Posted: Fri Jun 23, 2017 12:59 pm
by TDK
Here's a small API that's uses mushrooms as speed powerups.

How to use:

1. First put everything in this folder into your level's folder.

2. Make a lunadll.lua file.

3. Then type:
local speed_shroom = API.load("speed_shroom")

Addition things:
- The speed shroom replaces NPC-184, which is the SMB1 mushroom. If you want it to replace another NPC, just change the value speed_shroom.id.
For example, if you want it to replace the SMB3 mushroom (NPC-9), you would type speed_shroom.id = 9
- You can edit how long the speed boost will last by changing the value of speed_shroom.max.
So if you want it to last for 10 seconds you would type speed_shroom.max = 650

Here's an example level.


Download and enjoy:
https://www.mediafire.com/?3dqqllyk3j8h47t

Re: Speed Shroom API

Posted: Sat Jun 24, 2017 4:45 am
by Benial
Looks nice!

Feedback
  • Should have a shorter timer
  • Would be better with a star-like jingle to show it's temporary
  • Change the sprite. It looks too much like a normal 1-up
  • Maybe make a boost panel form?

Re: Speed Shroom API

Posted: Sat Jun 24, 2017 7:30 am
by TDK
Benial wrote:Looks nice!

Feedback
  • Should have a shorter timer
  • Would be better with a star-like jingle to show it's temporary
  • Change the sprite. It looks too much like a normal 1-up
  • Maybe make a boost panel form?
Thanks for the feedback.
You can edit the timer and the sprite.

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 5:26 pm
by timocomsmbx2345
Oh yeah, i want to see a powerup where you can shoot a fireball and an iceball at the same time.
Also, nice work; i'm gonna try and use custom power ups in my episode.

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 5:41 pm
by TDK
timocomsmbx2345 wrote:Oh yeah, i want to see a powerup where you can shoot a fireball and an iceball at the same time.
Also, nice work; i'm gonna try and use custom power ups in my episode.
I noticed that you mention shooting a fireball and iceball at the same time. How would that work exactly?

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 5:50 pm
by timocomsmbx2345
it shoots 2 projectiles at once

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 6:02 pm
by timocomsmbx2345
can yo change the speed of mario itself when yo get the speed shroom?

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 6:06 pm
by TDK
timocomsmbx2345 wrote:Oh yeah, i want to see a powerup where you can shoot a fireball and an iceball at the same time.
Also, nice work; i'm gonna try and use custom power ups in my episode.
Like this:
Spoiler: show
Image
timocomsmbx2345 wrote:can yo change the speed of mario itself when yo get the speed shroom?
Unfortunately no.
This API simply increases Mario's top speed to 16 pixels per frame (default is 6).

Although it's quite simply to change the top speed if you want it less than 16. For example if you want the top speed to be 10:

Code: Select all

	if player.speedX > 10 then
		player.speedX = 10
	elseif player.speedX < -10 then
		player.speedX = -10
	end

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 6:37 pm
by timocomsmbx2345
TheDinoKing wrote:
Like this:
Spoiler: show
Image
give me the link!

Re: Speed Shroom API

Posted: Mon Jun 26, 2017 10:32 pm
by timocomsmbx2345
I dont understand why but your apis dont seem to work on my pge editor.

Re: Speed Shroom API

Posted: Tue Jun 27, 2017 8:58 am
by TDK
timocomsmbx2345 wrote:I dont understand why but your apis dont seem to work on my pge editor.
Did you do everything in the instruction?

Did you make a new file called lunadll.lua and copy this into it?

Code: Select all

local speed_shroom = API.load("speed_shroom")