How do I make sprites visible for a short time and only one at a time, randomly?

1 favourites
  • 13 posts
From the Asset Store
A set of 30 Second Music Loops to add Emotion to your game!
  • Hello,

    So to summarize, I have 8 sprites that are invisible, I want them to become visible one at a time for a short time and then become invisible again. and I am trying to do random intervals.

    Any help would be appreciated!

  • Make use of System pick a random instance of Sprite : set visible.

  • "Make use of System pick a random instance of Sprite : set visible."

    Sorry, I'm very new to all this. Can you elaborate? I clicked Add Event> System> Pick Random Instance> Then it shows to choose an object and I can only pick one sprite.

    Do I have to do this for all 8 sprites?

  • Are you using 8 sprite objects, or 8 instances/copies of the same object? 8 instances would be more usual. Are you saying you want to make them visible one by one until all 8 are visible then reset them or are they being made visible/invisible randomly?

  • Are you using 8 sprite objects, or 8 instances/copies of the same object? 8 instances would be more usual. Are you saying you want to make them visible one by one until all 8 are visible then reset them or are they being made visible/invisible randomly?

    They are 8 different objects/sprites. I want them to become visible/invisible randomly but I don't want more than one to show up at the same time. (additionally I would like it to loop too)

  • What I mentioned above then would work well except you are using 8 different objects, usually it would be 8 instances of one object. If it is 8 objects then you group them in a Family, and you say pick a random instance of Family.

    Since you want only one visible at a time you can start a timer behaviour on the object. Then on the timer finished you can pick a random object again.

  • Unfortunately, I'm using the free version, so I guess I can't make families. :(

  • This is what I currently got going on. But this causes them to show up at the same time.

  • Make them into one object then with different animations or animation frame.

  • Make them into one object then with different animations or animation frame.

    I will try that, thanks.

    I'll try to get back to you later. (Probably a day or 2)

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • It seems to work, but it's not really random. the time that elapses from one frame to the next is the same amount of time and the frames are always going in order. Although I know I can add more blank frames and duplicates- but still, it's not actually random- it just plays the same loop.

    Unless there is a way I can make it random?

  • To make the time random you use a random time instead of a set number of seconds, every 5 seconds won't be random but you can use every random(a,b) time to make it different each time.

  • Ok, Thanks

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)