• 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!

GML Help with Variables?

W

wozzlewuzzle

Guest
Hello,
I'm gonna make this quick, I have a variable for my player's jump speed and I need to adjust the variable from another object as a jump boost power-up. I thought that the way to do this was to put "global." (the full variable would read "global.jumpspeed") before the variable name but when I try to use "global.jumpspeed" on the other object, it doesn't seem to work. Is there something I'm missing?
Thanks.
 
U

Ulrich6

Guest
You don't need a global variable for that. Just set the variable as so:

obj_player.jumpspeed = 5

or:

with (obj_player) jumpspeed = 5
 
Top