Jump to content

Proximity to Zone


Einsiedler

Recommended Posts

At times, when I use the trigger "Proximity-Platoon" it does not function.

I think I am missing a key ingredient to setting up the trigger. can anyone help?

**If I use it for AI platoon it always works. But if I use the player platoon it may or may not work.(usually not)

Steps I'm using;

1. Set-Variable-Player platoon in a startup block (init Player Platoon)

2. Make a zone.

3. Script a block triggered by proximity platoon (assigning player platoon to zone, leaving the default 10 as the distance)

(I understand that the distance is irrevalent in this scenario.)

thanks in advance..

Einsiedler

Link to comment
Share on other sites

I find the player controlled platoon works best in this scenario when this script is used

player ref as before of course

Set PlayersPlatoon to (the Player controlled Platoon)

but instead of using proximity as a trigger use <time elapsed>

then

<block preserve>

<continue if><proximity>

this works like a charm

it basically repeats the proximty query at the selected time interval

<time elapsed> :rocky:

Edited by X69RZX
Link to comment
Share on other sites

but instead of using proximity as a trigger use <time elapsed>

Be aware however that if the time selected is too long the player may pass right thru the trigger zone without being detected. This can even happen with a proximity trigger if the the zone or distance is too small - this is because GR only parses the script once per second. So unless there is a specific reason to use a time interval greater than one second you may as well stick with the Proximity Trigger as it amounts to the same thing.

Also, if you are using a Block Preserve before a query don't forget to use a block remove after it, if you don't what the triggered script to repeat endlessly at one second intervals - unless that is the intention of course.

Cheers, Jack :)

Link to comment
Share on other sites

I've got the set variable part nailed. and understand logic of using time elasped. But I have some missions that well "timing is everything" and I must set the trigger the second the players hit that zone. (i.e. escaping to a getway vehicle)

Here is one that didnt work;

Group: <Default>

Comment:

obj2

Trigger Event:

A member of PLYRs Platoon is within 1 meter(s) of A-10 Zone.

Responses:

Mark Objective 2 complete in the objective list.

Display "A-10 Site Recon Complete." to all players.

Increment OBJ Counter.

So i guess no ones had the same problem with proximity to zones not triggering?

?

EIN

Link to comment
Share on other sites

Does it not work or is it not fast enough? It is as Jack said, it's only gonna be as fast as 1 second, unless you miss the begining of the second then it might be 1.87sec or sumthing. It's not instant. Good call on the <block remove> Jack ;) Cheers!

Link to comment
Share on other sites

There are only two possibilities why it won't work;

1) the Variable Platoon Reference (PLYRs Platoon) for the Player Controlled Platoon is not set correctly or;

2) the zone is so small that the player is passing thru it before the program checks it.

When you have the Scripting dialogue open click on Summary and use the search function to find your Variable Platoon Reference block, then copy\paste it here so we can see if there is a problem with it.

Cheers, Jack :)

Link to comment
Share on other sites

1)

Group: <Default>

Comment:

Trigger Event:

The simulation is starting.

Responses:

Set Ghosts to (The player-controlled platoon).

2)

Group: <Default>

Comment:

Trigger Event:

A member of Ghosts is within 1 meter(s) of Zone SAM01.

Responses:

Make Team SAM01 01 visible to the game world.

Assign Plan SAM01 patrol to Team SAM01 01 and execute.

I had a rpoblem with it too, when I started with Igor : I turned the VariableSetPlatoon around. First I had it like this :

- Set (The player-controlled platoon) to the Ghosts.

That wouldn't work.

I looked at other missions how they did it :

- Set Ghosts to (The player-controlled platoon).

I still don't know why this makes any difference, but it does.

Link to comment
Share on other sites

variable set zone will work in finding it for the player platoon.

there are only two zones that are reconized by default I believe

Insertion zone and Extraction zone

Give it a name but ,when you script it in use the original name for it.

The name would be in a preaction block or start-up block either one ,but that's how I get it to function. <_<

Edited by -[NCM]-force
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...