Vartan 0 Posted April 6, 2002 How can i make a helicopter crash in a random place every time but in side the primiter defined by me ? thank you for your time in advance -vartan Share this post Link to post Share on other sites
AgamemnonTR 0 Posted April 6, 2002 this should help: create an object or a game logic and give it a name like "center" and place it anywhere on the map. the get it's x,y coordinates with the "getpos" command. the create a random number that would represent the radius of the area you want it to crash "x_random = random(200) - random(200)". That should produce 2 random numbers and their subtraction another random number to ensure that it won't always be a positive number (sometimes + and some -). now add the random number to your original coordinate, and you have your crash x coord "x1=x+x_random". repeat for y coord and then use this "my_helicopter setpos (x1,y1)". use the "setdammage" command, and you have a nice lil helicopter crashing anywhere up to 200 meters from the "center" object. simple, yes? Share this post Link to post Share on other sites
Vartan 0 Posted April 6, 2002 yes, i believe so. thanks Share this post Link to post Share on other sites