Fangames > Programming Questions

Creating a Quadjump-Collectable

(1/2) > >>

Storm_Lakitu2:
I created a object that lets you jump another time after the double jump if you collect it (like in Boshy).
I took the code from I wanna be the 8-bit (Sorry Seph, but your game is to appealing to not be raided xD).
Now i wanted to create a Quadjump, You do a Double Jump, collect it, and then can do another 2 Jumps without touching the Ground.
How do i make it?
Here is the code for the Trimple-Jump from 8-bit:
Create:image_speed = 1/4;
active = 1;
timer = 0;

realY = y;
wobbleDistance = 2;
stimer = random_range(-2,2);

Step:if active = 0
    { timer += 1; }
   
if timer > 100
    { visible = 1; active = 1; timer = 0;  }
   
y = realY + sin(stimer) * wobbleDistance;
stimer += 0.05;

Collisson with Player:if active = 1
    {
        player.screw = 0;
        player.djump = 1;
        active = 0;
        visible = 0;
    }

Sephalos:
That's fine, I said it before I don't mind people decompiling my games.

To do a quad jump you'll need to change the way the code works. I'm going to assume you're using yuutu or something similar (my engine is similar to yuutu). The way it works in that engine is it uses "true" and "false" statements to check wheter you have a double jump or not, so you'll have to change those to numbers.
There's one in the player create event, change that one to djump = 1;
Then there's another one in the player steps when the player lands on a block, change that one to djump = 1;
Then finally there's one in the playerJump script, change that one so that when the player double jumps it does djump -= 1; instead of djump = false

Then you'll have to make a object that either does  player.djump = 4; or if you want to collect them until you have 4 player.djump += 1; when a collision with the player happens.

Storm_Lakitu2:
Im in fact using your engine.
I will try this out and tell you if it worked, thanks for the quick reply.

Another question: Since Boshy isnt available for decompile since its in MMF2, is there any game where i can hget the boshy double jump item? you knowm that little blue orb?

Sephalos:
I'm not sure, you could just play boshy and take a screenshot, then cut out the sprite from the background.

Storm_Lakitu2:
So, if i do this, it lets me jump 4 times after collecting the item? i only want to jump twice. Any ideas? ;)

Navigation

[0] Message Index

[#] Next page

Go to full version