Jump to content
Sign in to follow this  
_qor

Switch scripted GUARD waypoint

Recommended Posts

Hey,

I have got a problem with GUARD waypoints.

It seems that this waypoint sometimes causes units to act strangely - or at least I dont get the reason.

E.g. groups run in any direction through the whole map, perhaps pursuing enemies, but I cant find those.

But using GUARD waypoints offers the advantage that groups either have a higher awareness or a connection to other groups under attack.

So they will defend their area by getting information about enemies from near friendly groups.

After doing so, I would like to have them to stop GUARD. In the editor this works with a SWITCH trigger. But how would I do this with scripted triggers/waypoints?

Creating a SWITCH trigger by script requires to sync it with the waypoint. Dont know how to do that.

Thanks for your help ;)

EDIT:

okay sorry I found a code for that. I have been misled by another post saying there is no way to do that...

_trigger synchronizeTrigger [_waypoint];

Edited by _qoR

Share this post


Link to post
Share on other sites

_qoR you should post your results on your question with what you did and what the end results were. People could use your post as resource about using the guard waypoint and the switch trigger. I hope you understand what I am saying. So many posts lead to dead ends on this forum because people never say what they did or how they fix the problem or what the solution was. I for one never fully understood the use of the guard waypoint with the switch.

Share this post


Link to post
Share on other sites

You are right!

My problem was that groups often act strange with GUARD waypoints. Because the GUARD waypoint doesnt end automatically (as MOVE waypoints do when reached), you can use a SWITCH trigger to make the group move to the next waypoint.

For example: supporting infantry which have a GUARD waypoint, you can make them cancel that support when enemies are gone. Of course this very depends on your scenario!

You can do this in the editor by synchronizing a trigger with the GUARD waypoint, or by script using the code I already posted.

The GUARD waypoint is still kinda mystery to me because it seems units do not act always the same.

In this case, I only send them to a marker which just didnt exist -.-

Share this post


Link to post
Share on other sites

_qoR I have been using the guard waypoint since my OFP days I love the waypoint because as you stated the units never act the same 100% of the time. When making a mission with the editor using only the guard waypoints for units far away and for the units in the AO using a sentry/guard combination waypoint was the best way to have a very dynamic mission without scripting. You can have five groups of units lets say 5000 meters away after the first contact some or all of the groups will move to the first know area of contact and then to the next. After a while some of the units will just hold a position or even move back to the original placement of the group. I never really understood the whole switch thing since ARMA2 because I stated getting into the whole mission making using the SQF and not the editor. I never know you could switch the guard waypoint to a different waypoint and back to the guard waypoint during a mission. I need to fool around with it again using it in my SQF's with the code you posted. _trigger synchronizeTrigger [_waypoint];. How to write it into the code within the SQF's that is my 100 dollar question of the day(:

Share this post


Link to post
Share on other sites

You cannot switch from the guard waypoint to the next waypoint and then back to the guard waypoint.

Switching only cancels the guard waypoint and units will move the their next given waypoint if they have. You need to create a new guard waypoint to have them guard again.

Your question is how to write the code in a script?

triggername synchronizeTrigger [waypointname];

The trigger can be created in the editor or by script, you just have to give it a time. I dont know how to give a waypoint a name by editor, so I only use scripted waypoints.

Remember that the trigger you synchronize to a waypoint must be a SWITCH trigger. Besides, you have to set it to a condition that makes it triggering when the GUARD waypoint should get switched.

Share this post


Link to post
Share on other sites

I think the problem with the original question you posted

Hey,

I have got a problem with GUARD waypoints.

It seems that this waypoint sometimes causes units to act strangely - or at least I dont get the reason.

E.g. groups run in any direction through the whole map, perhaps pursuing enemies, but I cant find those.

lies here:

Bug #23405. See note 5

Edited by panther42

Share this post


Link to post
Share on other sites

Ya thats it panther!

But strangely, this problem doesnt occur every time. And it also occurred when I was not part of the team.

So a SWITCH trigger may help in some scenarios...

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
Sign in to follow this  

×