• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[Solved] Help. I need help with a script.

S

Slashblock

Guest
Help! I need to get a script done by tonight. I'm in a school club where I have to make a video game.
Well, anyway. I have to have 3 levels on my game. It's a game where to click on objects that fall from the sky and you get points. (Stored in a variable name your_score)
So, I tried to make a script that gets you to a room after you get your_score to 100
This is the script that I tried

if (global.your_score >= 100)
room_goto(wait1);

it didn't work...

I'm not really good at GML. please help me
 

Rob

Member
That code should work as long as you're increasing the global variable properly.

Show your code to increase the score and where are you putting the previous code?
 
S

Slashblock

Guest
Event: Blue_Left Released_1


image_speed = 0.5;
global.your_score += 2;
audio_play_sound(burst, 10, false);


I am putting the first code in a object only being used for that

and the code I just said on this comment is in every object that falls from the sky.
 
R

robproctor83

Guest
Either the variable is not what you expect or your not running the code. Debug the code to figure out which.
 
Top