GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 GML Code Help » help with object variable and script » 2018-07-24 05:25:58

jonPS
Replies: 1

hello
i have a code that repeats itself several times on the object variables
my question is it possible to change the obj variables using a script ?

example:

Expand//--code-obj create event

move1 = 0;
move2 = 0;
Expand//--code-script_Pos

var mv = argument0;
mv += 10;
Expand//--code-step event

if (something)
{
     script_Pos(move1 );
}
else
{
     script_Pos(move2 );
}

I cant seem to change the obj variables with the script they always return 0... but if i change the script like this:

Expandvar mv = argument0;
move1 += 10;

move1 seems to increment +10 ?

Board footer

Powered by FluxBB