Legacy GM Making an intro slideshow

B

BenSunhoof

Guest
I am sorry if this has been discussed at any point in time, but I'm testing out making an intro that plays before getting to the actual game. What I did was create an object with 8 1024x768 sprites, each of them being one frame for my intro. Previously I planned on using these as backgrounds, but I'm not yet sure how to cycle between backgrounds (plus there's a limit on how many you can use in a room). My idea is to make a button in the corner of the screen that with each click cycles between subimages. I thought choose() would be the way, but it picks randomly. Is there any way I can accomplish this? Sorry if this is a very dumb question that I could look up somewhere, but I tried to find anything and couldn't.
 
C

CreatorAtNight

Guest
I clicked your post because of your Rich Evans profile picture! :D

Did you already make your game or is this the first thing you're trying to do?
Wouldn't you rather have the images cycle automatically? Not sure if players would like to click through 8 images every time when they start your game. Or is it more like a intro story only shown the first time you play?
 
B

BenSunhoof

Guest
New
I clicked your post because of your Rich Evans profile picture! :D
AAAAAAAAAAIIIIIIIIIIIIIIIIIIDSSSSSSSSSSSSS

Did you already make your game or is this the first thing you're trying to do?
Wouldn't you rather have the images cycle automatically? Not sure if players would like to click through 8 images every time when they start your game. Or is it more like a intro story only shown the first time you play?
I kind of make stuff up as I go along. You may be right about players not wanting to click through 8 images, but it's more about me knowing how this stuff works, not about whether it's practical or not. I can add a button to skip straight to the game anyway, so. I still really want to know how I can achieve what I want.
 
C

CreatorAtNight

Guest
If you do it with sprites I would just put all the images in one sprite as sub images and than do this on the step event of the button object (I use "obj_image" as the object that has the image sprite on it):
Code:
if (mouse_x > 0 && mouse_x < 100 && mouse_y > 0 && mouse_y < 100) {
   if (mouse_check_button_pressed(mb_left)) {
      obj_image.image_index += 1;
   }
}
Here I'm assuming you have a 100x100 button with the origin point at X0 Y0. You might need to change those values to work with your button.

And than in your obj_image put this in the create event:
Code:
image_speed = 0;
That should do it.
 
B

BenSunhoof

Guest
If you do it with sprites I would just put all the images in one sprite as sub images and than do this on the step event of the button object (I use "obj_image" as the object that has the image sprite on it):
Code:
if (mouse_x > 0 && mouse_x < 100 && mouse_y > 0 && mouse_y < 100) {
   if (mouse_check_button_pressed(mb_left)) {
      obj_image.image_index += 1;
   }
}
Here I'm assuming you have a 100x100 button with the origin point at X0 Y0. You might need to change those values to work with your button.

And than in your obj_image put this in the create event:
Code:
image_speed = 0;
That should do it.
Made some adjustments to suit my situation and it worked! Thank you twofold.
 
Top