Jump to content

Distance


RussiaGhost

Recommended Posts

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... :hmm:

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by RussiaGhost
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...