Littlegaard
Member
hello
im kinda new in this game maker thing
and i have a problem with either understanding the global variables or making it work
so if i set up a global i should be able to use that variable everywhere right?
like if i set a variable like this- and also is it possible to do this?
(im not very good with this progamming but i am learning)
im doing this in step btw
and then in another object in the step event set
and when i do this i always get the error
''variables not set before reading it'' and now i have googled and fiddled with this all day, and i cant understand why.
anybody who has any idea why?
im kinda new in this game maker thing
and i have a problem with either understanding the global variables or making it work
so if i set up a global i should be able to use that variable everywhere right?
like if i set a variable like this- and also is it possible to do this?
(im not very good with this progamming but i am learning)
im doing this in step btw
GML:
global.interact = keyboard_check_pressed(vk_up);
Code:
if global.interact {
sprite_index = off
}
''variables not set before reading it'' and now i have googled and fiddled with this all day, and i cant understand why.
anybody who has any idea why?