Show images While Waiting for Game To Load (Question)

gamedivisiongamedivision Member Posts: 807
edited November -1 in Working with GS (Mac)
just a quick 1 i want to be able to show a random image while waiting for my game to load not 100% sure how to do it.
any ideas

thanks

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You mean between scenes or jus when the app first opens?
  • gamedivisiongamedivision Member Posts: 807
    between scenes
  • JamieOneilJamieOneil Member Posts: 877
    gamedivisionuk said:
    just a quick 1 i want to be able to show a random image while waiting for my game to load not 100% sure how to do it.
    any ideas

    thanks

    You could spawn a random image before the load starts, but you will not be able to change it while it is loading.
    You could just say -
    change attribute 'game.randomimage to random(1,5)' (change the 5 depending on how many random images there are
    And then on the button that starts loading the next scene just put -
    If attribute game.randomimage = 1 then spawn actor 'YOUR IMAGE'
    If attribute game.randomimage = 2 then spawn actor 'YOUR OTHER IMAGE'
    etc AND then put
    Timer- After 0.1s change scene.

    That will make your random image appear before the next scene loads.
    Not to sure if their is an simple way, i have never really tried this.

    J.O
  • gamedivisiongamedivision Member Posts: 807
    JamieOneil said:
    You could spawn a random image before the load starts, but you will not be able to change it while it is loading.
    You could just say -
    change attribute 'game.randomimage to random(1,5)' (change the 5 depending on how many random images there are
    And then on the button that starts loading the next scene just put -
    If attribute game.randomimage = 1 then spawn actor 'YOUR IMAGE'
    If attribute game.randomimage = 2 then spawn actor 'YOUR OTHER IMAGE'
    etc AND then put
    Timer- After 0.1s change scene.

    That will make your random image appear before the next scene loads.
    Not to sure if their is an simple way, i have never really tried this.

    J.O

    thanks ill give that a pop now
  • RHRH Member Posts: 1,079
    Just thought I'd point out that you don't need a rule for every image. If you want to save on performance just name all the images similar, say image1.png image2.png etc and instead of all the rules just have change attribute self.image to "image"..random(1,5)..".png"
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    I would not spawn an actor that size just to change scenes. Just set an actor out of the camera that has the image you want and then change the camera to show that before you change scenes
  • JamieOneilJamieOneil Member Posts: 877
    tenrdrmer said:
    I would not spawn an actor that size just to change scenes. Just set an actor out of the camera that has the image you want and then change the camera to show that before you change scenes

    I would not spawn, but it seems better in an example to just say spawn. I think gamedivisionuk is fairly experienced and knows he does not have to spawn.
    But instead of spawning yes your way would be better.

    J.O
  • gamedivisiongamedivision Member Posts: 807
    tenrdrmer said:
    I would not spawn an actor that size just to change scenes. Just set an actor out of the camera that has the image you want and then change the camera to show that before you change scenes

    Thanks guys for your replies

    cant use this tenrdrmer as i already have other things controlling the camera plus scene wrap
    RH said:
    Just thought I'd point out that you don't need a rule for every image. If you want to save on performance just name all the images similar, say image1.png image2.png etc and instead of all the rules just have change attribute self.image to "image"..random(1,5)..".png"

    i can however use this but is there a code to add to this for non repeating
    thanks
  • gamedivisiongamedivision Member Posts: 807
    cancel last its working without repeating anyway thanks its sorted
Sign In or Register to comment.