Im tying to delay a script. That means my script tests if a player is near 500m from a defined position. If a player is in the 500m radius the script will stop and should go on when no player is in the 500m radius. But I dont get that working. The script stops and does not continue after the player leaves the area. That is the beginning to the script and it should test only on the beginning that no player is near the position. After checking that no player ist near and continuing with the rest of the script it should not test again. Can someone help me out?
Question
Airwaves Man
Hey guys,
Im tying to delay a script. That means my script tests if a player is near 500m from a defined position. If a player is in the 500m radius the script will stop and should go on when no player is in the 500m radius. But I dont get that working. The script stops and does not continue after the player leaves the area. That is the beginning to the script and it should test only on the beginning that no player is near the position. After checking that no player ist near and continuing with the rest of the script it should not test again. Can someone help me out?
_coords = [14514,10424,0];
_timer = true;
while {_timer} do {
_playerNear = {isPlayer _x} count (_coords nearEntities ["CAManBase", 500]) > 0;
waituntil {!_playerNear};
_timer=false;
};
Rest of the script
..
..
..
Link to comment
Share on other sites
6 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