• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Can the start position on a path be randomized?

N

Nathan

Guest
I have a movement path for an enemy, but using the path makes the enemy predictable as to where it will go since it's a simple sine wave pattern. I'd like to randomize that start position along the path so each enemy at least starts at a different point of the path. Is this possible? Or do I need to use math instead?
 

chamaeleon

Member
I have a movement path for an enemy, but using the path makes the enemy predictable as to where it will go since it's a simple sine wave pattern. I'd like to randomize that start position along the path so each enemy at least starts at a different point of the path. Is this possible? Or do I need to use math instead?
Is it possible you will get the effect you want by assigning a random value between 0 and 1 (or whatever range contained within 0 to 1 that makes sense for your path) to path_position for your enemy instances?
 
Top