Best way of achieving random actor spawning and random x positions

jigglybeanjigglybean Member Posts: 1,584
edited April 2015 in Working with GS (Mac)

Hi all

In the image, I need the best way of making an actor spawn randomly from points 1-4 AND, along the x position to have a random x(so it may spawn at 400, then 480, 900 etc etc).

I have an projectile actor that overlaps with the spawned actor.

I managed to make it work earlier using a table and made all the spawning actors spawn in the right locations and randomly.

However, I wanted to attach a detector actor to the spawn actor, so only the projectile collides with the detector, the Game spawner should spawn a new actor from either 1-4 locations.

Ive tried a few ways but all attempts have failed

Like Balls? Then click here! We've 100 coming soon

Answers

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Sounds like a code order issue. Study when things are firing. You need to be sure the reporting of location happens first before the second actor spawns. The other idea would be to have the Radom locations report to game level attributes first or the table location of the data and pass that to the spawning actor before they spawn.

  • jigglybeanjigglybean Member Posts: 1,584

    Thanks for your reply Dave

    I've been trying to figure this out but its just not working as intended.

    I'm thinking of changing how the spawner works but stuck on how to kick things off.

    Im gonna edit this thread

    Like Balls? Then click here! We've 100 coming soon

  • jigglybeanjigglybean Member Posts: 1,584

    Updated

    Like Balls? Then click here! We've 100 coming soon

  • jigglybeanjigglybean Member Posts: 1,584

    bump

    Like Balls? Then click here! We've 100 coming soon

  • myu699myu699 Member Posts: 96

    For finding a random x position I would say the interpolate function is probably the best as it is smooth while the move to is often glichy and wierd, or at least from my experience.

Sign In or Register to comment.