Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

goodmorning shaun, 

i really need ur help because i'm stuck video 2 (animation) because of this error:

___________________________________________

############################################################################################

ERROR in

action number 1

of Create Event

for object <undefined>:

Variable <unknown_object>.direction(8, -2147483648) not set before reading it.

 at gml_GlobalScript_Script2 (line 2) - var _cardinalDirection = round(direction/90);

############################################################################################

gml_GlobalScript_Script2 (line 2)


can you maybe help me?

(1 edit)

This is because GameMaker changed the way how scripts work.
You have to put everything inside the "playerAnimateSprite" script into the curly brackets of a function:

function playerAnimateSprite()
{
    // put code here
}

EDIT:
now I see Shaun already adressed this problem in a sticky comment under the yt video, have a look there for more information.

does not work for me

Deleted 1 year ago