How to make a Random Sprite to Appear

undefeatedgames

  • Posts: 121
How can I make a random sprite appear?

Photon

  • Posts: 2691
Please elaborate. Are you talking about randomly selecting an animation from an actor?
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

undefeatedgames

  • Posts: 121
Please elaborate. Are you talking about randomly selecting an animation from an actor?
No.

I have different actors, how can I make a behavior so one of the actors randomly appears?

Photon

  • Posts: 2691
You could add the actors you want in question to a list in a behavior somewhere, and then randomly select one from the list to spawn.
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

undefeatedgames

  • Posts: 121
You could add the actors you want in question to a list in a behavior somewhere, and then randomly select one from the list to spawn.
How would I spawn the actor?

Photon

  • Posts: 2691
Something like this:

Create [get item # (random number) from (actor list attribute) at x, y at Front/Middle/Back

Just make sure the random number is restricted to the range of the list.
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

undefeatedgames

  • Posts: 121
Something like this:

Create [get item # (random number) from (actor list attribute) at x, y at Front/Middle/Back

Just make sure the random number is restricted to the range of the list.
Can you post an image of this block? I am not sure where to find a couple of the components.

Photon

  • Posts: 2691
I'm not on my normal computer, unfortunately. Here:

Create Actor : Under Scene >> Actors
Get Item : Under Attributes >> Lists
Actor List Attributes : Under Attributes >> Getters
Random Number : Under Numbers & Text >> Math
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

undefeatedgames

  • Posts: 121
How would i add certain actors to the list?


airman4

  • Posts: 875
I think you add [Actor]"name of the actor"  on the list ?