Home   Help Search Login Register  

Author Topic: Activate Waypoint and New Waypoint  (Read 2761 times)

0 Members and 1 Guest are viewing this topic.

Offline GoldGazelle

  • Members
  • *
  • Knowledge can be taught. Wisdom can not.
Activate Waypoint and New Waypoint
« on: 05 Feb 2011, 20:51:47 »
Hi everyone. It has been a while since I've posted and I want to thank anyone who can help ahead of time. I presantly have two problems that need to be addressed. I have a feeling there is some simple thing that I am missing but I can't seem to figure it out.

Activate Waypoint:
-One thing that does not look good is when the player is hiching a ride in a helo and the helo flies a course of several waypoints, and each waypoint it comes to the helo stops turns then flies towards the next one. Is there a way to create a trigger right before each waypoint so that when the helo activates the trigger it activates the closest waypoint without the helo getting right close to the waypoint making the helo flight path more fluid. In other words, is there a script to activate a waypoint without a unit entering the waypoints activation area. Which sort of brings me to my next question.

New Waypoint:
-Say you have three waypoints with an objective after the third wp. Now, at the third wp something happends (team member gets kill or an abush happens or armour is between you and your objective) and a trigger changes your wp to a different path to the same destination. I know that if something did happen at wp three you could just move around and head to your objective with out any new wp but in the real military world you have specific orders to travel a certain way and if the situation cahnges then upper command would order you to take another route with certain wp and what if there was another waypoint between #3 and objective (on original path) and enemy tanks were sitting right on top of it. what do you do? 
 
player--------0--------0-------0---------------objective1
                                            |
                                             --------0--------objective1 (with different approache)


Tahnk you for your time and I hope that this hasn't been to complicating.


 

Walter_E_Kurtz

  • Guest
Re: Activate Waypoint and New Waypoint
« Reply #1 on: 06 Feb 2011, 01:05:07 »
Use the Switch type of trigger - when these are synchronized with a units waypoints they indicate that the unit should move on to the NEXT waypoint instead.

Activate Waypoint
Repeat the following for each waypoint that you want the helo to move towards without actually reaching it:

place a trigger close to the waypoint in question: dimensions 150 x 150 minimum, type Switch.
press F2 and drag a line from the helo to the trigger.
(Check the trigger's properties; it should now be activated by Vehicle, Present).
press F5 'Synchronize' - and drag a line between the trigger and waypoint.


New waypoint
Lay the player's waypoints out going via the alternative route. There should be a Switch trigger at the third waypoint synchronized with the waypoint just prior to the objective.
Thus, when playing, the player moves to WP 3 and if the event does NOT occur the Switch trigger should trip and direct them straight to the objective.


If you need it to be more intricate, that will probably require scripting and use of setWPPos.

Offline GoldGazelle

  • Members
  • *
  • Knowledge can be taught. Wisdom can not.
Re: Activate Waypoint and New Waypoint
« Reply #2 on: 07 Feb 2011, 00:16:45 »
Thanks Walter_E_Kurtz

I will give these a try and let you know how it works out.

Just another quick questoin. I downloaded an editing guide a while ago (forget which one) and there is a comand "NextWaypoint" (I think). The person who created the guide didn't know how it was used. Would you happen to know?

Thanks for your time.

GoldGazelle

Offline RKurtzDmitriyev

  • Former Staff
  • ****
Re: Activate Waypoint and New Waypoint
« Reply #3 on: 07 Feb 2011, 04:22:08 »
Quote
I downloaded an editing guide a while ago (forget which one) and there is a comand "NextWaypoint" (I think).

Other Kurtz here. "NextWaypoint" command? Never heard of it, and it's not in the comref or biki.

However, I believe it is possible to skip waypoints by using setWPPos to move them to the group leader's position.
The OFP Editing Center wishes to remind you that the faithful COMREF will never threaten to stab you and, in fact, cannot speak.
However, in the event that it does speak, you are encouraged to heed its advice. ;)

Offline Raptorsaurus

  • Editors Depot Staff
  • *****
Re: Activate Waypoint and New Waypoint
« Reply #4 on: 08 Feb 2011, 07:24:07 »
You could also try this script I made called "NoStopWP.sqs". If you need help implementing the script PM me and I will make a demo mission.

Offline savedbygrace

  • Intel Depot
  • Administrator
  • *****
  • Be swift to hear...slow to speak...slow to wrath.
Re: Activate Waypoint and New Waypoint
« Reply #5 on: 09 Feb 2011, 17:39:01 »
More than likely, the best aesthetic way to move a helo around without it actually reaching a waypoint, slowing, turning and proceeding is to give it a first waypoint, place a condition on it that will prevent it from going to the next waypoint until you force the condition true. After that waypoint will be your objective waypoint. You could then use the move, domove commands to manipulate the helo's orders in a slow looping script without the added triggers and then declare the condition true in the first waypoint when you're ready and the helo will move to the objective waypoint. Use distance checks to objects or group leaders to redirect without ever reaching the ordered position(no stopping or slowing). It's definitely time consuming to grab the coordinates of each position but you could go with the simple method of placing game logics where you would have liked each waypoint to have been and naming them. Of course, the coordinate method will reduce the global variable count and prevent any potential risk of the OFP savegame bug.

Using a slow looping script will also accommodate other condition checks that will allow you to move the helo to different routes, depending on the returned condition checks. So essentially, you end up with no triggers, and only two editor placed waypoints but more importantly, no stop and go.

Offline GoldGazelle

  • Members
  • *
  • Knowledge can be taught. Wisdom can not.
Re: Activate Waypoint and New Waypoint
« Reply #6 on: 10 Feb 2011, 21:25:32 »
Thanks guys,

I'll give "setwppos" and "nostopwp" a try. And thanks Walter_E_Kurtz for your help. I used your ideas and it worked great.

Another question for you guys:

You know when you are playing the game, you open the map and you can double click (can't remember if it is left or right click) and create an objective marker and name it what ever you want. Is there a script that could turn this marker into a waypoint that is between the players current position and their next waypoint? Or a way that you could palce a new waypoint for you next wp and also name it (by name I mean a Description).

thanks,
GoldGazelle

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Activate Waypoint and New Waypoint
« Reply #7 on: 11 Feb 2011, 01:57:40 »
I think so. You Try look in the Editors Depot there You'll find many tutorials  ;)

Regards
~Aldo
« Last Edit: 11 Feb 2011, 01:59:33 by Aldo15 »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Walter_E_Kurtz

  • Guest
Re: Activate Waypoint and New Waypoint
« Reply #8 on: 12 Feb 2011, 02:43:12 »
The User Defined Marker Detection script by Snypir can figure out where a player has double-clicked on the map.

Create a waypoint before the current one? - Not in the way you're hoping for (those sort of scripting commands, like addWaypoint are newer than OFP).

Give the WP a changeable name? - I don't think so. setWaypointDescription is an ArmA command.


What I think you'd have to do is set out additional waypoints beyond the final objective with a multi-purpose description or of the appropriate type (Move, Destroy, etc.). Then use the Switch property of triggers to assign the player one of these extra waypoints and reposition it with setWPPos.
You'd need a second Switch trigger to detect when the player arrives at the new waypoint, and make the final objective WP active once more. This trigger can be moved with plain setPos to the same location as the temporary WP.

Offline GoldGazelle

  • Members
  • *
  • Knowledge can be taught. Wisdom can not.
Re: Activate Waypoint and New Waypoint
« Reply #9 on: 20 Feb 2011, 23:58:54 »
Hey there Guys,

After a few hours of messing around I found a way to cycle through the players waypoint (or Objectives) with radio commands, making the waypoints more like visual in game markers.

I have attached a example mission (with no addons necessary) with a readme file to this post that shows and explains as much of it as possible. Yes it is a very large explination, but for those who are newish to scripting it may be necessary.

Please let me know if any of you have questions or concerns.

Thanks,
GoldGazelle

Offline Aldo15

  • OFP-addict
  • Former Staff
  • ****
    • My OFP missions
Re: Activate Waypoint and New Waypoint
« Reply #10 on: 21 Feb 2011, 03:47:55 »
Hi GoldGazelle

well, I've tested your example, all is perfect!, but there is a problem. When I  use the Radio, can't finished "The Mission" because You've put this:

Code: [Select]
this and v4 and v5 and v6
If I use the Radio to skip the waypoints, these aren't activated... You should to remove that. Now You should to put in the waypoint-----> on Activation:
Quote
V7=true
to We can to meet your example.

Now I know what you were asking, but I had not read it, I thought you were asking a tutorial above "onSingleMapClick"

Regards,
Aldo

EDIT: The Waipoint where you must to put
Code: [Select]
V7=true is the last.... Named : "Extraction"
« Last Edit: 21 Feb 2011, 03:58:13 by Aldo15 »
My OFP stuff
FMF Project by Aldo15. Coming soon.
If in the high school or university, Teachers add a new subject about how to make scripts, missions, for ofp. I'd be number one of my classroom

Offline GoldGazelle

  • Members
  • *
  • Knowledge can be taught. Wisdom can not.
Re: Activate Waypoint and New Waypoint
« Reply #11 on: 28 Feb 2011, 00:30:22 »
Hi there Aldo15,

Thanks for your input, but you have misunderstood my example. You are supposed to go to each waypoint (doesn't matter which order you go to each one). v4 v5 and v6 should each be activated when you go to each of the objective waypoints, and then you can go to the extraction waypoint.

The purpose of this was to allow the player to cycle through his waypoints (or objectives) so that you can choose which one to go to first and go to each one in what ever order you want, but you still have to go to each waypoint (or objective) or you will not be able to go to the extraction ("you must complete each objective before your mission is complete", sort of thing).

I put the variables in the extraction waypoint so that if you accidentally walked through it on your way to the third objective waypoint (if you chose that one to go to first) then it won't be activated until you have visited each objective.

I hope I have explained this thoroughly enough.

GoldGazelle

Offline NightJay0044

  • Former Staff
  • ****
  • Let's make OFPEC great again
    • My Steam Workshop
Re: Activate Waypoint and New Waypoint
« Reply #12 on: 09 Mar 2011, 20:51:27 »
Quote
New Waypoint:
-Say you have three waypoints with an objective after the third wp. Now, at the third wp something happends (team member gets kill or an abush happens or armour is between you and your objective) and a trigger changes your wp to a different path to the same destination. I know that if something did happen at wp three you could just move around and head to your objective with out any new wp but in the real military world you have specific orders to travel a certain way and if the situation cahnges then upper command would order you to take another route with certain wp and what if there was another waypoint between #3 and objective (on original path) and enemy tanks were sitting right on top of it. what do you do? 
 
player--------0--------0-------0---------------objective1
                                            |
                                             --------0--------objective1 (with different approache)

Hi I don't know if you've gotten this figured out yet but here I go. Basically something happens after WP3 and player is caught inbetween the objective and WP3. You want an alternate WP4 inbetween the objective and WP3 that the player can go to? You want the team to move around the threat to the objective without engaging it? Is this correct?
Who's hyped for Arma4, long live Arma!