Creepermon wrote:Can you explain how it's formatted. I'm trying to set it up, but I can't work out what every bit means. I'm a bit of a novice with Lunalua, so it's probabally quite obvious...
You can look at the code of my level to see how it works. Also did you downloaded the Pipe Cannon API (link to it can be found in the first post)? And if you did, did you put it in the level folder?
Anyway this is how it works:
1) First you load the Pipe Cannon API with this piece of code put in lunadll.lua (put both pipecannon.lua and lunadll.lua in a level folder):
2) Next thing to do is
set the exit-shooting speeds for each warp. Yes, even if your level has doors or instant warps, you still should set shooting speeds for them. The API will ignore all shooting speeds set for doors and instant warps, as without the shooting speeds set Pipe Cannons just won't work properly.
If 0 is set = the pipe won't launch you, if >0 is set = the pipe will launch you. Here's the code example from my level:
Code: Select all
pipeAPI.exitspeed = {18, 0, 22, 22, 32, 18, 10, 12, 12, 15, 0, 0, 20}
As you can see in the code, my level has only 10 'real' Pipe Cannons which are Warps #1, 3-10 and 13
3) Now here's something that I only used once in the level - a diagonal Pipe Cannon. Here I set the
shooting angle for the cannon. Keep in mind that you don't need to set the angles for every warp - they will work without them. There's a picture that shows how angles work:
http://wohlsoft.ru/pgewiki/Pipecannon.lua#Documentation
Again, here's an example code from my level:
Code: Select all
pipeAPI.angle = {}
pipeAPI.angle[13] = 45
Even if you don't have any angled pipe cannons, you still need to put that first line of the piece of code above into your code. 13 - warp number; 45 - angle for shooting (in my level it shoots right, but if I'd change the number to -45, it would shoot left).
4) Some minor stuff like shooting SFX (sound) and the effect GFX (graphics) for shooting can be also modified! These changes, however, will affect ALL the Pipe Cannons.
Code: Select all
pipeAPI.SFX = 22
pipeAPI.effect = 10
Here you can see that all Pipe Cannons in my level use: ID of 22 for SFX (which is a Bullet Bill Shooting sound) and ID of 10 for effect GFX (which is a SMW 'poof' effect graphic). If values are set to 0, no SFX/GFX will be played/shown. Of course you can change the values to whatever you want.
SFX ID reference:
http://wohlsoft.ru/pgewiki/SFX_list_(SMBX64)
Reference for effect GFX can be found in your "effects" folder which is in your SMBX folder.
5) And the last thing we need to put is this:
This is very important as the code won't work without this!!!
And we're done! I pretty much covered everything that the API has to offer.
---------------------------------------------
Anyway I hope this helped. All of the codes above are directly taken from my level's code, so they
will work.
Natsu wrote:I have actually spotted out this thread before but never posted anything ... so hi(?).
yo long time no see