Best way of achieving random actor spawning and random x positions
jigglybean
Member Posts: 1,584
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
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.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
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
Updated
Like Balls? Then click here! We've 100 coming soon
bump
Like Balls? Then click here! We've 100 coming soon
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.