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