Jump to content
Sign in to follow this  
Joe98

What is the command equivalent of Random Between ?

Recommended Posts

I name a soldier green1 and name a truck truck1

I want the soldier to start 20 meters to the east of the truck so use this command

green1 setPos [(getPos truck1 select 0) +20, (getPos truck1 select 1) +0, (getPos truck1 select 2) +0];

Now instead of using 20 meters I would like to use a command such as “Random Between 20 and 500â€.

How do I write the equivalent of Random Between?

Share this post


Link to post
Share on other sites

random

green1 setPos [(getPos truck1 select 0) + 20 + (random 480), (getPos truck1 select 1) +0, (getPos truck1 select 2) +0]

Share this post


Link to post
Share on other sites

I have confirmed this works thank you!

Blues! Blues! Blues! :cool:

Share this post


Link to post
Share on other sites
I have confirmed this works thank you!

Blues! Blues! Blues! :cool:

Wasted effort mate, I'm a transplanted Victorian and couldn't give a shit about either kind of rugby. In fact, I'll yell at my kids if I ever see them throw a footy backwards :)

Glad you got random working!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×