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

tiny town tutorial missing info?

I'm following the tiny town tutorial to help develop learn the language but Sometimes it seems like in missing information, I'm in the sequences section and ive used all the code it provides in the proper places but when i press the S key i get an error that curSeqLayer is not set before the program reads it. this is all the code I have

room start
GML:
// Mark Sequences layer
if (layer_exists("Cutscenes")) {
curSeqLayer = "Cutscenes";
}
else {
curSeqLayer = "Instances";
}
game start
GML:
// Sequence states
enum seqState {
notPlaying,
waiting,
playing,
finished,
}
// Sequence variables
sequenceState = seqState.notPlaying;
curSeqLayer = noone;
curSeq = noone;
key press - S
GML:
// Set Sequence to centre of Camera view
var _camX =
camera_get_view_x(view_camera[0])+floor(camera_get_view_width(view_camera[0])*0.5)
;
var _camY =
camera_get_view_y(view_camera[0])+floor(camera_get_view_height(view_camera[0])*0.5
);
// Create Sequence on the proper layer
if !(layer_sequence_exists(curSeqLayer,seq_endGame)) {
if (layer_exists(curSeqLayer)) {
layer_sequence_create(curSeqLayer,_camX,_camY,seq_endGame);
// Make sure Cutscenes layer is above the action
layer_depth(curSeqLayer,-10000);
}
}
if the tutorial is correct i should be able to play my sequence when I press the S key but thats not what happens
 
Top