Jump to content
Firebro113

Waypoint Condition Not Working

Recommended Posts

I have a triggerActivated statement in the condition expression of a waypoint so that it completes whenever that trigger is set true, and I have a radio message in OnActivation to make sure of this.

 

However, the waypoint never completes, and the radio message never appears.

 

When I have the exact same lines of code in another trigger, it works, so I doubt it is a problem with the original trigger or the code itself.

Share this post


Link to post
Share on other sites

how exactly should one be able to help if you provide nearly none information?

  • Like 1

Share this post


Link to post
Share on other sites

Ask nicely my friend.

 

What I said in code format:

 

trigger1: activates when BLUFOR takes over area (which it does)

 

Seek And Destroy waypoint:

condition: triggerActivated trigger1

onactivation: HQ sidechat "test1" (this is just to make checking easier)

 

trigger2 (the only purpose of this is to demonstrate that the trigger and sidechat are working):

condition: triggerActivated trigger1

onactivation: HQ sidechat "test2"

 

HQ sends the "test2" message but not the "test1"

Share this post


Link to post
Share on other sites

Maybe you already know this but there is a thing with waypoints. Let us say we have waypoint 1 and 2. The condition you place in waypoint 1 will be the condition so as for waypoint 2 to be activated. Waypoint 1 will already have been activated. So maybe you will need to place an extra move waypoint next to the appropriate unit and place your condition code there. 

 

^^ That is for the set trigger activation line which is the one I always use. Judging from below posts it works how you want it. Sorry for that. ^^

And if your code does not work you can sync the trigger directly to the waypoint. The set trigger activation line. That should work  :thumbsup:

  • Like 1

Share this post


Link to post
Share on other sites

Works fine for me although I used hint for message.

Before the message shows the waypoint needs to complete so the searching needs to finish which can take a minute or two.

 

 

  • Like 1

Share this post


Link to post
Share on other sites

@JohnKalo Would I need to set the Type of the trigger to Skip Waypoint, or would it do the same thing without it too?

 

@f2k sel

Doesn't changing the condition from true make it so that the waypoint doesn't have to be completed?

Or am I misunderstanding and does it make it so that the waypoint has to complete & the condition has to be true?

Share this post


Link to post
Share on other sites

If you intend to skip waypoint(s), the best way is to use the setCurrentWaypoint command in your trigger. Something like:

yourGroup setCurrentWaypoint [yourGroup, nbr]  where nbr is the index of the waypoint + 1 (because 0 is the start position, not the first waypoint index in editor).

 

NOTE: the "identified" field in the waypoint init board of the editor is something useless here (and probably always).

  • Like 1

Share this post


Link to post
Share on other sites

If it's false it won't complete but it will perform the WPtype S&D, LAND, MOVE ect.

The ON ACT will also not activate, when it becomes true the the WP and Action are complete.

 

If you want a WP  not  perform the WP type until it becomes true you place a waypoint previous to that and set that to false.

 

 

                                                                                                                  / if false wait until true  and not perform   on act ------- when true  run on act and move to next WP

                                                                                                                /

----- move to wp then perform  WP  type  ---- check condition ----

                                                                                                                \

                                                                                                                   \  if true  run on act and move to next WP ---------------------------

 

Share this post


Link to post
Share on other sites

@pierremgi Thank you, I will try it.

 

@f2k sel

Sorry, I wasn't very clear.

If a group has a Destroy Waypoint with a condition of [triggerActivated trigger1], does the trigger need to be activated & the group has to destroy the target?

Or is it that if trigger1 is activated, it will move to the next waypoint regardless of whether the target was destroyed or not?

 

Edit: I didn't read the flowchart right, so it is complete then check, right?

Share this post


Link to post
Share on other sites

True and triggerActivated trigger1     is equal to  WP Target destroyed and  trigger1 activated  so both need to be true.

 

If you were to use just triggerActivated trigger1  the unit would just wait for the command to turn true.

 

The Destroy waypoint only works when attached to an object  other wise it will just default to true.

Share this post


Link to post
Share on other sites

Ok, thank you for the info.

Can you tell why my code isn't working?

Share this post


Link to post
Share on other sites

I got a little bit confused so I will just describe how the set trigger activation line works.

 

  • You place a unit.
  • You place a move waypoint right next to the unit.
  • You place another Search and Destroy waypoint.
  • You create a trigger. You place whatever condition you like.
  • You use the set trigger activation line to connect the trigger to the move waypoint.
  • Done!

 

What will happen is that the Search and Destroy waypoint will start once the condition of the trigger is met. 

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×