GMS 2.3+ Problem with sequences

BQubed

Member
I've watched quite a few tutorials on sequences but have yet to see the problem I'm encountering. Here is the code:

GML:
layer_sequence_create("Instances",oPlayer.x,oPlayer.y,sqDoorOpen)
This code results in the supposed-to-animate door popping up over the player for a split second (without animating) and then vanishing. If I use a sprite, instead of an object, in the track panel then the door DOES animate when it pops up, but it still vanishes in the end. I won't dismiss the possibility that I did something wrong in the sequence IDE so I've included a screenshot. My end goal is to make it so that when I use the activate button on a door, the door object is overridden by a sequence that animates the door.

1606889950224.png
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
Your sequence is 60 frames long but the instance/sprite track is only 8 frames. That's why it disappears. Either change the length of the sequence or change the length of the track. :)
 

BQubed

Member
Thanks! I totally missed that sequence length value on the right. They really should label that or something. I have a couple of quick questions though:

1) When the track is an object, it doesn't animate on the map, but when it's a sprite, it does. Is that a 2.3.1 feature or is there a way to do it with objects?
2) When I place a sequence on the map, it is always below objects regardless of which layer it's on. Is that just a property of sequences or is there a way to fix that?
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
1) When the track is an object, it doesn't animate on the map, but when it's a sprite, it does. Is that a 2.3.1 feature or is there a way to do it with objects?
I'm pretty sure that when you have an object in the sequence, the animation will be governed by the object's animation code. Either that or use the image index parameter track.
2) When I place a sequence on the map, it is always below objects regardless of which layer it's on. Is that just a property of sequences or is there a way to fix that?
The SEQUENCE may be on a different layer, but I think the object may be on different one. Not 100% sure about that though, as I haven't had much time to play with sequences much... One thing I would suggest though is that you look at the override instance functionality for sequences, as I suspect that this will make what you are trying to do easier. Basically, you create the sequence with a "dummy" instance then override it with the instance in the room (in this case the door). @matharoo has a tutorial video on this concept:
 
Top