Fangames > Programming Questions

Jump Refreshers

(1/1)

kilgour22:
After a bunch of messing around, I haven't gotten anywhere with creating jump refreshers. Any help would be appreciated. The engine being used is Yuutu.

HAEGOE:
Here's a Jump Refresher code I used



if image_alpha = 1 {
if instance_exists(player){
player.djump = 1;
}
image_alpha = 0;
instance_create(x, y, JumpBonusText);
alarm[0] = 150;
}
//this means when player touch it, you can get player's djump to 1.

use this to when the jump refresher object collides to player, and if you need it for player2(reversed gravity) use that, and change 'player' to 'player2'

image_alpha = 1;

use this at alarm 0. This is for jump refresher's alpha being 1, which is for jump refresher being restored.

Sorry I couldn't make it simpler

kilgour22:

--- Quote from: HAEGOE on June 03, 2014, 11:30:02 PM ---Here's a Jump Refresher code I used



if image_alpha = 1 {
if instance_exists(player){
player.djump = 1;
}
image_alpha = 0;
instance_create(x, y, JumpBonusText);
alarm[0] = 150;
}
//this means when player touch it, you can get player's djump to 1.

use this to when the jump refresher object collides to player, and if you need it for player2(reversed gravity) use that, and change 'player' to 'player2'

image_alpha = 1;

use this at alarm 0. This is for jump refresher's alpha being 1, which is for jump refresher being restored.

Sorry I couldn't make it simpler

--- End quote ---

For whatever reason, this cloned the player every time I hit a jump refresher... I have the alarm 0 and a collision event with object player and the code being executed. Any ideas as to what could be causing it?
https://gyazo.com/4b7357e2070f0e76eaeb2a5ca6ef2fda

HAEGOE:
Oh, Sorry.

if image_alpha = 1 {
if instance_exists(player){
player.djump = 1;
}
image_alpha = 0;
alarm[0] = 150;
}

use this instead. I forgot to delete the code to create an object for extra jump restored effect.

kilgour22:

--- Quote from: HAEGOE on June 04, 2014, 01:37:12 AM ---Oh, Sorry.

if image_alpha = 1 {
if instance_exists(player){
player.djump = 1;
}
image_alpha = 0;
alarm[0] = 150;
}

use this instead. I forgot to delete the code to create an object for extra jump restored effect.

--- End quote ---
Thank you! Worked perfectly. :BloodTrail:

Navigation

[0] Message Index

Go to full version