FANTASTIC tutorial - easy to follow! - thanks a lot Slyddar - I've been avoiding messing with these, but after seeing you break it down to easily-digestable chunks, and seeing how powerful and time-saving these can be if used properly, I can see myself using this feature a LOT! Thanks as always for the great community content / tutorials!
Hi ! Great tutorial and easy to follow but I don't understand at 51:56 when you create the sequence at the position 0,0 this will not work if you have a camera and you move further in the room right?
G'day, thanks! Yes this is just for fading into and out of a room which is the size of the camera only. If you wanted to move the camera, you would need to change the position of the sequence. To do that you need to capture the sequence element id and just move it per step. Create 2 globals in obj_game : global.seq_in = noone global.seq_out = noone When using the layer_sequence_create function, it returns the sequence element id, so just assign that to the relevant seq variables. Then create a Draw Begin Event in obj_game and add this : var _lay = layer_get_id("Transition"); if layer_sequence_exists(_lay, global.seq_in) { layer_sequence_x(global.seq_in, camera_get_view_x(view_camera[0])); layer_sequence_y(global.seq_in, camera_get_view_y(view_camera[0])); } if layer_sequence_exists(_lay, global.seq_out) { layer_sequence_x(global.seq_out, camera_get_view_x(view_camera[0])); layer_sequence_y(global.seq_out, camera_get_view_y(view_camera[0])); } That should be all. Be aware though, I've just discovered a bug with layer_set_target_room, which means revisiting a room will create the original asset again, so you'll see another fade. It's noticeable only when the camera moves from the origin as per the code above. It's been submitted, so while it is getting patched, an alternate method is to create this variable in the obj_game create event : global.create_fade_in = false; And then instead of creating the fade sequence using layer_set_target_room in the create_transition function, comment those lines out, and just set create_fade_in to true. Then in obj_game room_start event, create the fade in sequence there. if global.create_fade_in { global.create_fade_in = false; layer_create(-16000, "Transition"); global.seq_in = layer_sequence_create("Transition", 0, 0, seq_fade_in); } It's basically the same thing, so will all work the same as the other method. Hope that helps.
@@Slyddar Thanks!!! I've been trying for a few days to get this to work. I still haven't made it. Either the fade in doesn't work or the fade in doesn't follow the camera. I would like to know if there is any more noob friendly method to make the seq (or objs) follow the camera instead of being stopped at the origin of creation.
Sequences are a nightmare. I love some features and hate others. For simple things they're pretty good but i was using them for cutscenes for a client and getting the sequence struct and modifying sequence behaviour is hell. I was trying to get the sequence's sprites to continue their animation while the sequence is paused and it just would not work. I gave up in the end and used objects instead which is okay but if i was to do cutscenes again i'd make my own system instead of using sequences.
FANTASTIC tutorial - easy to follow! - thanks a lot Slyddar - I've been avoiding messing with these, but after seeing you break it down to easily-digestable chunks, and seeing how powerful and time-saving these can be if used properly, I can see myself using this feature a LOT!
Thanks as always for the great community content / tutorials!
This tutorial was brilliant. More would be greatly appreciated.
Excellent tutorial - please let Peter do more of these!
Great tutorial, I just realized how powerful sequences can be!
Nice tutorial! Adventure II sounds pretty cool, but I'm excited for GameCube remake, Adventure II: Battle.
That was outstanding.
Excellent tutorial.
Interesting 🤓 I have not played with sequences yet it seems like they have a lot of potential.
wow thanks never knew sequence was a thing!!!!!!!!
this was pretty good, anymore in the works using the sequence system? Like cutscenes?
How this it work if we have more than one resolution? more than 1920x1080
отдельное спасибо за глюк с ошибкой в компиляции, я долго не мог понять из-за чего она.
You're welcome. I think it's beneficial when errors happen while recording a video, so you can see how certain problems get solved.
Hi ! Great tutorial and easy to follow but I don't understand at 51:56 when you create the sequence at the position 0,0 this will not work if you have a camera and you move further in the room right?
G'day, thanks! Yes this is just for fading into and out of a room which is the size of the camera only. If you wanted to move the camera, you would need to change the position of the sequence. To do that you need to capture the sequence element id and just move it per step. Create 2 globals in obj_game :
global.seq_in = noone
global.seq_out = noone
When using the layer_sequence_create function, it returns the sequence element id, so just assign that to the relevant seq variables. Then create a Draw Begin Event in obj_game and add this :
var _lay = layer_get_id("Transition");
if layer_sequence_exists(_lay, global.seq_in) {
layer_sequence_x(global.seq_in, camera_get_view_x(view_camera[0]));
layer_sequence_y(global.seq_in, camera_get_view_y(view_camera[0]));
}
if layer_sequence_exists(_lay, global.seq_out) {
layer_sequence_x(global.seq_out, camera_get_view_x(view_camera[0]));
layer_sequence_y(global.seq_out, camera_get_view_y(view_camera[0]));
}
That should be all. Be aware though, I've just discovered a bug with layer_set_target_room, which means revisiting a room will create the original asset again, so you'll see another fade. It's noticeable only when the camera moves from the origin as per the code above. It's been submitted, so while it is getting patched, an alternate method is to create this variable in the obj_game create event :
global.create_fade_in = false;
And then instead of creating the fade sequence using layer_set_target_room in the create_transition function, comment those lines out, and just set create_fade_in to true. Then in obj_game room_start event, create the fade in sequence there.
if global.create_fade_in {
global.create_fade_in = false;
layer_create(-16000, "Transition");
global.seq_in = layer_sequence_create("Transition", 0, 0, seq_fade_in);
}
It's basically the same thing, so will all work the same as the other method.
Hope that helps.
@@Slyddar ok got it !
Thanks again for the great tutorials!
@@Slyddar Thanks!!!
I've been trying for a few days to get this to work. I still haven't made it. Either the fade in doesn't work or the fade in doesn't follow the camera.
I would like to know if there is any more noob friendly method to make the seq (or objs) follow the camera instead of being stopped at the origin of creation.
more sequence base tutorials would be nice. I have seen some use cases that to me seem pretty mindblowing to b honest.
Noted!
Does anyone know how to tie sequence time not to global time but to in-game frames?
I’ve been asking this question for so long. Did you ever find answer?
So this just works with sprites not objects? so for example you cant use it to create a smooth slide in menu on mobile?
It works with objects too!
cool :0
Sequences are a nightmare. I love some features and hate others. For simple things they're pretty good but i was using them for cutscenes for a client and getting the sequence struct and modifying sequence behaviour is hell. I was trying to get the sequence's sprites to continue their animation while the sequence is paused and it just would not work. I gave up in the end and used objects instead which is okay but if i was to do cutscenes again i'd make my own system instead of using sequences.