playMaker

Author Topic: Random position but excluding some positions  (Read 1088 times)

LogLady

  • Full Member
  • ***
  • Posts: 150
Random position but excluding some positions
« on: April 29, 2020, 06:10:48 PM »
Hi!

Is there an action that I can put a range of values (int or float) but exclude some values from the range or a range within the range to obtain random values? If no action exists who can I achieve this?

Example: range from int -30 to 30 but exclude values from -5 to 10 from the random pool.

Thanks!

TheBadFeeling

  • Junior Playmaker
  • **
  • Posts: 66
Re: Random position but excluding some positions
« Reply #1 on: April 29, 2020, 07:43:44 PM »
I don't know if there's an action that will do that. But it sounds a bit like two random ranges, -30 to -5 and 10 to 30. Maybe you just need to generate two values and then pick one of them.
The Force is with you, young Playmaker – but you are not a C# senpai yet.

LogLady

  • Full Member
  • ***
  • Posts: 150
Re: Random position but excluding some positions
« Reply #2 on: April 29, 2020, 10:04:36 PM »
Worked like a charm!
Thanks!