#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Spawning &#039;actors&#039; at random locations that grow to random sizes

Posts: 3Member
edited 2:04AM
I need to spawn actors (they will be bubbles) in my game at a random location that will grow from a very small size to a random size between a specified setting (like the bubbles are getting 'blown up'). I also need these 'bubbles' to be 'blown up' at different speeds (some faster, some slower).

So I specifically need to do the following:

Decide where to spawn object at random;

Determine the size the object will grow (random width/height with min/max);

Determine the speed the object will grow;

Then the object needs to actually spawn and grow;

How would I do the above?

Thanks.

• Posts: 1,079Member
Next time have a quick check through the behaviours list

I believe there is a change size behaviour, in fact, i know there is as I have just used it.

As for the spawning, create a spawner actor and create a rule on it so that (i don't know when you want it to spawn so lets say...) every 1 second spawn actor. Use the random function so that in the X position it looks like 'random(0,XXX)' and in the Y position it looks like 'random(0,YYY) . XXX and YYY being the X limit and Y limit of where they should spawn.
• Posts: 3Member
Ok, I found the change size behavior, works great. (I'm sorry I didn't see this in the behaviors list before)

I cannot, however, figure out how to make them spawn every 1 second like you suggested. I can make a rule that can do something when game.Time = a certain integer, or is >, <, etc. . . but I cannot figure out how to get it to spawn something every x amount of seconds.

What am I missing?
• Posts: 3Member
Nevermind, I've discovered the "Timer" behavior. This is all getting more familiar. . .
This discussion has been closed.