Home   Help Search Login Register  

Author Topic: deleteWaypoint Issue  (Read 2504 times)

0 Members and 1 Guest are viewing this topic.

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
deleteWaypoint Issue
« on: 09 Jan 2010, 08:41:50 »
Ok, here is my problem: I have a mission where Group A enters a town to clear out the enemy, and Group C is held in reserve until Group A takes losses. This is accomplished quite easily by the following code:

Code: [Select]
WEST CountSide Units WSQDA <5 or obj1
The problem comes in when the objective is cleared. Group A, which had been in the town on search & destroy waypoint moves on out to the rallying point. I want Group C to move to the rallying point as well, but they proceed to complete their search & destroy waypoint that was assigned as part of their reinforcement role.

I then tried to place the following in the objective completed trigger:

Code: [Select]
deleteWaypoint [WSQDC, 2]; deleteWaypoint [WSQDC, 3]
Understanding the 0 is the spawn point of the group and 1 is there hold waypoint synchronized to their reinforcement trigger, 2 is the S&D and 3 is the cycle waypoints.

The problem is the waypoints are deleted and the group returns to their spawn point; It is as if deletewaypoint is used that it not only deletes the waypoints identified for the assigned group but also all other waypoints placed in the mission editor thereafter.

What I want is Group C only to move into the town on S&D if Group A takes the specified losses, and then move to the rallying point once the objective is completed, otherwise move to the rallying point once the objective is completed and not go into the town because the reinforcement trigger was not fired.

Is there a simpler and cleaner way to do this?  :P
Ranger, out.

Offline i0n0s

  • Moderator
  • *****
Re: deleteWaypoint Issue
« Reply #1 on: 09 Jan 2010, 10:41:45 »
As soon as you delete waypoint 2, waypoint 3 (the cycle) will get waypoint 2 and you delete the rally point.
Why don't you use a switch trigger to bypass the cycle instead?

Offline RangerX3X

  • Members
  • *
  • Ranger, out.
    • RangerX3X
Re: deleteWaypoint Issue
« Reply #2 on: 09 Jan 2010, 12:34:00 »
I can get it to work somewhat now by only deleting the second waypoint (where they move to in order to reinforce).

What I need is to know how to have a trigger able to fire only if a specific objective or other trigger has not been fired.
Ranger, out.

Offline i0n0s

  • Moderator
  • *****
Re: deleteWaypoint Issue
« Reply #3 on: 09 Jan 2010, 14:56:41 »
If you use a boolean variable which get changed when the objective or trigger have changed, then it ain't no problem.