Author Topic: Creating a Quadjump-Collectable  (Read 4433 times)

Storm_Lakitu2

  • Wannabe
  • Posts: 14
  • King Kirby
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • Twittah
  • Playstyle: Keyboard
Creating a Quadjump-Collectable
« on: April 03, 2015, 03:26:01 PM »
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;
    }
"Restarting Music? pff, my game restarts if you die!"

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Gamepad
Re: Creating a Quadjump-Collectable
« Reply #1 on: April 03, 2015, 03:47:26 PM »
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

  • Wannabe
  • Posts: 14
  • King Kirby
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • Twittah
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #2 on: April 03, 2015, 03:59:06 PM »
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?
"Restarting Music? pff, my game restarts if you die!"

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Gamepad
Re: Creating a Quadjump-Collectable
« Reply #3 on: April 03, 2015, 04:04:44 PM »
I'm not sure, you could just play boshy and take a screenshot, then cut out the sprite from the background.

Storm_Lakitu2

  • Wannabe
  • Posts: 14
  • King Kirby
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • Twittah
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #4 on: April 03, 2015, 04:08:42 PM »
So, if i do this, it lets me jump 4 times after collecting the item? i only want to jump twice. Any ideas? ;)
"Restarting Music? pff, my game restarts if you die!"

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #5 on: April 03, 2015, 05:00:18 PM »
change the max value to 2 or something
(click to show/hide)

smoke weed everyday

Sephalos

  • Spike Dodger
  • Posts: 228
  • OS:
  • Windows Vista/Server 2008 Windows Vista/Server 2008
  • Browser:
  • Chrome 41.0.2272.101 Chrome 41.0.2272.101
    • View Profile
  • Playstyle: Gamepad
Re: Creating a Quadjump-Collectable
« Reply #6 on: April 03, 2015, 05:10:03 PM »
change the max value to 2 or something
This. At the bottom of player steps do if djump > 2 { djump = 2; }

Kyir

  • The Kid
  • Posts: 293
  • Normal Guy
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.118 Chrome 41.0.2272.118
    • View Profile
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #7 on: April 03, 2015, 06:57:58 PM »
Just use a cloud in a bottle from Terraria as your jump refresher.

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 41.0.2272.118 Chrome 41.0.2272.118
    • View Profile
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #8 on: April 03, 2015, 07:13:40 PM »
pls
(click to show/hide)

smoke weed everyday

Storm_Lakitu2

  • Wannabe
  • Posts: 14
  • King Kirby
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 36.0 Firefox 36.0
    • View Profile
    • Twittah
  • Playstyle: Keyboard
Re: Creating a Quadjump-Collectable
« Reply #9 on: April 04, 2015, 08:39:33 AM »
I think i got it to work but i dont ned it anymore because i found a better solution :Kappa:

But thanks for the replies here.
"Restarting Music? pff, my game restarts if you die!"