siriuz Posted February 19, 2015 Report Share Posted February 19, 2015 Hello, i need a formula for this, vehicles should only spawn in the B-area, not in A. Someone has an idea? thx Link to comment Share on other sites More sharing options...
0 Guest Posted February 19, 2015 Report Share Posted February 19, 2015 first: spawn vehicles in circle b, second: delete all vehicles in cirle a, or split it up in small spawnareas Link to comment Share on other sites More sharing options...
0 Mikeeeyy Posted February 19, 2015 Report Share Posted February 19, 2015 Hello, i need a formula for this, vehicles should only spawn in the B-area, not in A. Someone has an idea? thx Lets say radius of A is 50 and B is 100. You would check the distance from the center and make sure it is >= A and <= B. _dist = _center distance _pos; _dist >= 50 && {_dist <= 100} siriuz 1 Link to comment Share on other sites More sharing options...
0 siriuz Posted February 20, 2015 Author Report Share Posted February 20, 2015 first: spawn vehicles in circle b, second: delete all vehicles in cirle a, or split it up in small spawnareas Not a very good solution. From Mikeeeyy is better, but now using this, fits my imagination. _radius = 100; _pos = getPosATL _target; _step = 20; for '_i' from 0 to 360 step (_step) do { _vehicle = createVehicle ["kamaz", [(_pos select 0) + ((cos _i) * _radius), (_pos select 1) + ((sin _i) * _radius),_pos select 2], [], 0, "CAN_COLLIDE"]; }; TY all! Link to comment Share on other sites More sharing options...
0 Mikeeeyy Posted February 21, 2015 Report Share Posted February 21, 2015 Not a very good solution. From Mikeeeyy is better, but now using this, fits my imagination. _radius = 100; _pos = getPosATL _target; _step = 20; for '_i' from 0 to 360 step (_step) do { _vehicle = createVehicle ["kamaz", [(_pos select 0) + ((cos _i) * _radius), (_pos select 1) + ((sin _i) * _radius),_pos select 2], [], 0, "CAN_COLLIDE"]; }; TY all! Ahh, I thought you meant you wanted to spawn the vehicles within the green and red line. Link to comment Share on other sites More sharing options...
Question
siriuz
Hello,
i need a formula for this, vehicles should only spawn in the B-area, not in A.
Someone has an idea?
thx
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now