How do I randomly spawn an actor in between a certain area?
jacob717
Member Posts: 9
How would I spawn an actor into a random area such as in between the white space? (just make up dimensions for the area, just need an example) Thanks!
http://i1243.photobucket.com/albums/gg556/Jake717/Untitled.png
Comments
@jacob717,
Let's say your white area starts at x=400, ands at x=460 (I don't really know, but you get the picture).
At its simplest, your Spawn behaviour should spawn the actor at x=value between 400 and 460, y = value between 0 and highest value of y (depending on game size).
From there, then you would build your conditions on how to spawn - timer, score, whathaveya.
Good luck!
My Blog / App Store / Google Play
@mhedges
I can't get it to work
What happened? Spawn at the wrong place or no spawn? If wrong place, then recheck your x and y ranges. If no spawn, do you have an actor invoking the spawn actor behavior?
My Blog / App Store / Google Play
Here's a demo.
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Spawn Actor
↑ random(50,300) → random (50,300) relative to scene