Random Actor/Character Spawning

illestEditzillestEditz Member Posts: 15
edited April 2013 in Working with GS (Mac)
Hey guys, I watched the GameSaladCookBook tutorial on spawning actors randomly...


And it doesnt seem to work anymore, I am using Windows 7 and have only 2 actors that I want to spawn randomly, any solutions? Pls help? :D

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Edited thread title. No need for "URGENT! HELP!" Everyone here feels their questions are urgent and wants help. People will respond when they read your thread and if they can help.

    Describe what you're trying to do ("random spawning" could mean spawning a random number of actors, or spawning actors in random locations, etc.) and we'll see what we can suggest.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • illestEditzillestEditz Member Posts: 15
    Edited thread title. No need for "URGENT! HELP!" Everyone here feels their questions are urgent and wants help. People will respond when they read your thread and if they can help.

    Describe what you're trying to do ("random spawning" could mean spawning a random number of actors, or spawning actors in random locations, etc.) and we'll see what we can suggest.
    Sorry abt that, but as I have linked the video, I meant random spawning of actors in random locations in a scrolling motion... as if the characters are falling from the sky. Get what I mean?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Yes, I do understand. It's helpful to know which video you are referencing but (and maybe it's just me) I don't want to spend my time watching a video when I can just glean the information from a sentence or two. So thank you for explaining it.

    If you want actors to fall from the sky, you would place an actor just above the top edge of the screen with:

    Timer every [any number] seconds
    .....Spawn actor [actor name] [x: random(1,320)] [y: 568+[falling actor height/2]]

    In the falling actor, you would have:
    Move [direction:270, relative to screen] [speed: any number]

    *320 represents the screen width
    *568 represents the screen height

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • illestEditzillestEditz Member Posts: 15
    Thanks alot tatiang, it worked
  • junaid558junaid558 Member, PRO Posts: 29
    edited April 2014

    @tatiang said:
    Yes, I do understand. It's helpful to know which video you are referencing but (and maybe it's just me) I don't want to spend my time watching a video when I can just glean the information from a sentence or two. So thank you for explaining it.

    If you want actors to fall from the sky, you would place an actor just above the top edge of the screen with:

    Timer every [any number] seconds
    .....Spawn actor [actor name] [x: random(1,320)] [y: 568+[falling actor height/2]]

    In the falling actor, you would have:
    Move [direction:270, relative to screen] [speed: any number]

    *320 represents the screen width
    *568 represents the screen height

    how to make an actor fall like a rain fall(in multiple units of that unit)from outside the screen @tatiang?(like in the below image

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @junaid558 That's exactly what I posted the rules for. Did you try what I suggested? If so, what happened when you previewed it? You can always add multiple spawn actor behaviors to increase the density of the rain.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • junaid558junaid558 Member, PRO Posts: 29

    @tatiang i tried what you said,but once the actor spawns(goes down)the same procedure does not repeat....try to install this sperm race(https://play.google.com/store/apps/details?id=com.paxplay.spermrace)..you will get the idea:)

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Sorry, I don't have an Android device to test that on.

    If you have a timer that isn't repeating, it means that the rule you have placed it in is not triggering. Try using the timer by itself outside of any rule.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • junaid558junaid558 Member, PRO Posts: 29
    edited April 2014

    @tatiang i cant figure it out still:(
    see this ios game...car (other than user controlling car)i mean cars coming from top of screen...i think you can get now:)-https://itunes.apple.com/in/app/road-fighting/id602534653?mt=8

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I don't understand what showing me various games is supposed to do. There's something wrong with your rules. Post a screenshot and maybe we can find out what's going on.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • christylowchristylow Member Posts: 1

    hi guys, anyone knw how to touch, spawn and drag and drop an actor like the video below.

  • DrCalderoneDrCalderone Member, PRO Posts: 9

    Does anyone have any good formulas to spawn actors "food" like in the game agar.io? I've been trying to figure out a way, but am stumped..

Sign In or Register to comment.