RussiaGhost Posted January 14, 2013 Share Posted January 14, 2013 There is a method getrange It measures the distance between the objec. How to make this distance izmeryalast between the player and each individual actor rather than one? Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 16, 2013 Share Posted January 16, 2013 You might want to try something like this, but not sure if it works, just guessing. Every 3 seconds it should loop through the entire enemy company and if any of them are within 10M of the player it should activate... Group: <Default> Comment: SetUp Trigger Event: The simulation is starting. Responses: Enable the DC 01 script blocks. Group: DC 01 Comment: compare distance 01 Trigger Event: 3 second(s) elapsed. Responses: Allow this block to be reactivated. Use Distance check to loop over all actors in Company enemy after this block. Group: Distance check Comment: compare distance 02 Trigger Event: An actor loop is ready to process Next Actor. Responses: Allow this block to be reactivated. Continue executing responses if ((The distance between (The player-controlled actor) and Next Actor) is less than 10). Change the maximum spotting distance to 5. Play "tm1_detected1.wav" at volume 1. Disable the DC 01 script blocks Prevent this block from being reactivated. Quote Link to comment Share on other sites More sharing options...
RussiaGhost Posted January 17, 2013 Author Share Posted January 17, 2013 Group: <Default> Comment: SetUp Trigger Event: The simulation is starting. Responses: Allow this block to be reactivated. Enable the DC 01 script blocks. Set Player to (The player-controlled actor). Group: DC 01 Comment: compare distance 01 Trigger Event: 3 second(s) elapsed. Responses: Allow this block to be reactivated. Use Distance check to loop over all actors in Company E after this block. Group: Distance check Comment: compare distance 02 Trigger Event: An actor loop is ready to process Next Actor. Responses: Allow this block to be reactivated. Continue executing responses if ((The distance between Player and Next Actor) is less than 10). Change the maximum spotting distance to 5. This works but the range of fire if the distance between the player and the enemy of more than 10, not increase it. Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 17, 2013 Share Posted January 17, 2013 Not sure what you mean here. Russian characters seem to be disabled in the forums, unable to translate. Quote Link to comment Share on other sites More sharing options...
RussiaGhost Posted January 18, 2013 Author Share Posted January 18, 2013 (edited) Continue executing responses if ((The distance between Player and Next Actor) is less than 10). Change the maximum spotting distance to 5. Continue executing responses if ((The distance between Player and Next Actor) is greater than 10). Change the maximum spotting distance to 70. This no Job.I want to have two conditions: 1 If the distance is less than 10 meters from the enemy. Change the maximum spotting distance to 5. If the distance to the enemy more than 10m Change the maximum spotting distance to 70. Edited January 18, 2013 by RussiaGhost Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 18, 2013 Share Posted January 18, 2013 Try RedirectIf Responses: Allow this block to be reactivated. If ((The distance between Player and Next Actor) is less than 10), stop and queue a call to SPOT 05. Continue executing responses if ((The distance between Player and Next Actor) is greater than 10). Change the maximum spotting distance to 70. Group: SPOT 05 Comment: change spotting to 5 Trigger Event: This block has been called directly from the script. Responses: Allow this block to be reactivated. Change the maximum spotting distance to 05. Quote Link to comment Share on other sites More sharing options...
RussiaGhost Posted January 19, 2013 Author Share Posted January 19, 2013 Group: <Default> Comment: SETUP Trigger Event: The simulation is starting. Responses: Set This platoon to (The player-controlled platoon). Use B Plan to loop over all teams in This platoon after this block. Set Charlie to expire in 1 second(s). Prevent this block from being reactivated. Group: <Default> Comment: CHARLIE TIMER Trigger Event: Charlie has expired. Responses: Use C Plan to loop over all teams in This platoon after this block. Group: <Default> Comment: If Bravo in room Trigger Event: A member of Bravo is within 10 meter(s) of Zone Rooms. Responses: Allow this block to be reactivated. Change the maximum spotting distance to 3. Prevent this block from being reactivated. Group: <Default> Comment: If Charlie in room Trigger Event: A member of Charlie is within 10 meter(s) of Zone Rooms. Responses: Allow this block to be reactivated. Change the maximum spotting distance to 3. Prevent this block from being reactivated. Group: <Default> Comment: Room team death Trigger Event: All members of Team Room 1 have been killed. Responses: Allow this block to be reactivated. Change the maximum spotting distance to 70. Prevent this block from being reactivated. Group: B Plan Comment: SETUP BRAVO Trigger Event: A team loop is ready to process this team. Responses: Allow this block to be reactivated. Continue executing responses if (this team is not equal to (The team including (The player-controlled actor))). Set Bravo to this team. Prevent this block from being reactivated. Group: C Plan Comment: SETUP CHARLIE Trigger Event: A team loop is ready to process this team. Responses: Allow this block to be reactivated. Continue executing responses if (this team is not equal to (The team including (The player-controlled actor))). Continue executing responses if (this team is not equal to Bravo). Set Charlie to this team. Prevent this block from being reactivated.That's easier option. So works. If a team or Bravo Charlie zone room Change the maximum spotting distance to 3. If you killed all the enemies of the room to return Change the maximum spotting distance to default. Quote Link to comment Share on other sites More sharing options...
Tinker Posted January 19, 2013 Share Posted January 19, 2013 Looks nice, good luck with it, sounds intersting already. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.