I tried doing that, the second one would never be created no matter what I did.have 2 separate sequences..
at the end step (or destroy event rather) of the 1st sequence, start the 2nd sequence... and have the 2nd sequence repeat on a loop?
tried that too.maybe try calling the 2nd sequence at the cleanup event of the 1st? ;o)
scoured over the whole thing.looking at the reference manual
thats the 2 ways i would go about it ;o)
Okay, but how would i prevent it from creating a new sequence every frame after the variable becomes true?brainstorming here ;o) dont mind me...
in a controller object,.
set a variable to true when the 1st sequence has been destroyed
if (that variable is true)
{
start the 2nd sequence;
}
I mean in the controller object, once the variable becomes true, wouldn't it create a new instance of the second sequence every frame afterwards?doesnt the sequence get destroyed at the end of the animation? not the end of the step ..thats how i interpreted it anyway ;o)
right, ill try that.check if the 2nd one is already running..
if !sequence_exists(whatever you name the 2nd sequence)
Code:if (that variable is true) { if !sequence_exists(whatever you name the 2nd sequence) { start the 2nd sequence; } }
is there a way to get the sequence to do that?doesnt the sequence get destroyed at the end of the animation? not the end of the step ..thats how i interpreted it anyway ;o)
I was actually looking at that same thread, lol. I usually use DnD but I'll just use the execute code block for this one.layer_sequence_destroy()
found some info for ya here on our forums ;o)
Destroying a sequence? Solved
So I want to press 1 and play a sequence. Then press 2 and play another sequence. This works fine. But the next sequence plays behind the first. So I need to destroy the first. So I have been trying to figure this out with watching videos and manual. But obviously I am missing...forum.yoyogames.com
I think my problem is that the sequence is created from the IDE. But I can't create it in an object create event for some reason, because for a reason I don't know, whenever I do that, the game freezes before the room can even load!I tried doing the creation of the new sequence and the deletion of the first in a "moment", but the first sequence is not deleting. I'm gonna try to look into this.
okay, the creating on a create event works now for some reason, but the sequence still won't disappear! I think I'm just going to resort to making the last frame of the first sequence transparent.i think we gonna have to wait on more exp than what ive got bro ;o)
one would think it wouold work similar to instance_create and instance_destroy.. the events are all similar to a regular object related events and whatnot..
now your gettin hillbilly with it ;o)making the last frame of the first sequence transparent.
nope, doesnt work. i think ill stick with hillbillying it.now your gettin hillbilly with it ;o)
that'll make it disappear from the your view, but its still there ....gonna be aresource hog / memory leak
maybe add a moment inthe second sequence and destroy the 1st one there?
Toque
To destroy a sequence its quite simple.
Create:
sequence = layer_sequence_create("Instances", x,y,seq_1);
To destroy it:
layer_sequence_destroy(sequence);
Toque
I kept chasing sequence_destroy. Unaware that layer_sequence_destroy() existed. It was only when I clicked on "layer functions" buried in the manual did I find them.