I want my object to appear in one position or the other

Basically what the title says. I’m trying to make it so that when the text of my timer reaches a certain value that an object is created in one of two positions. I’ve tried multiple expressions on create object to get this to work, such as RandomInRange, min/max/mod(number,number) etc, but I’ve only succeeded in creating objects anywhere in between two values, or causing an object to be created in a single position every single time. Is there anything I can do to make an object have a fifty-fifty chance of appearing in either one position or the other?

Edit: the first 2 examples just move an existing object; the last example adds an object using a timer.

Pick a random number then move it based on the number

For a more visual way. Add 2 sprites to the scene named say “target”. You can hide them if you want to. Then use the pick a random object and then move the object to its position or put it around it.

Both versions with a timer, you could then delete or restart the timer

I didn’t think I’d have to add more sprites to my game in order spawn in objects, but this worked (minus the fact that I didn’t put Center in my expressions). Thanks!

1 Like

You’re welcome. Whatever works for you. I’m a visual person. I like having the sprites instead of values but you use what works for you. Later.