addWaypoint – Talk
Jump to navigation
Jump to search
mNo edit summary |
Lou Montana (talk | contribs) m (Text replacement - "<code>" to "<code style="display: block">") |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 2: | Line 2: | ||
:What do you mean by the waypoint ID? The second element in the array that's returned? That should (and does) increment. The first one is the group name and stays the same. Check [http://www.kronzky.info/misc/waypoints.zip this] demo mission that creates dynamic waypoints. --[[User:Kronzky|Kronzky]] 09:57, 29 December 2006 (CET) | :What do you mean by the waypoint ID? The second element in the array that's returned? That should (and does) increment. The first one is the group name and stays the same. Check [http://www.kronzky.info/misc/waypoints.zip this] demo mission that creates dynamic waypoints. --[[User:Kronzky|Kronzky]] 09:57, 29 December 2006 (CET) | ||
:: The 0 waypoint is reserved for the initial starting position. Try starting from 1. Perhaps the example should be updated. [[User:Hoz|hoz]] | :: The 0 waypoint is reserved for the initial starting position. Try starting from 1. Perhaps the example should be updated. [[User:Hoz|hoz]] | ||
:::'''???''' You don't specify the WP index in the addWaypoint command. ArmA automatically adds the new one behind the last current one. The zero in the argument (and in the example) is the placement radius. Or which zero are you referring to? [[User:Kronzky|Kronzky]] | |||
::::Your right, I'm mixing it up with another command. :) [[User:Hoz|hoz]] | |||
== Notes == | |||
I moved the note here, it could use some cleaning up(punctuation,typos). Also the example seems a bit drawn out. | |||
'''Example 1:''' easy use of this command to move a unit(group) to another unit. | |||
Put in Group leader's Init field:(the group that is to move)<br> | |||
<code style="display: block">gotogroup=group this</code><br> | |||
Name the unit or object that you want this unit(group) to move to. I named a soldier Bobby. | |||
Make a trigger that will send the gotogroup to Bobby. (Use radio Bravo) | |||
In the trigger's Onact section put this code:<br> | |||
<code style="display: block">WP=gotogroup AddWayPoint [GetPos bobby,0];[gotogroup,0] setWaypointType "MOVE"'''</code><br> |
Latest revision as of 11:53, 11 January 2023
It seems to me that added waypoints are not correctly stacked. I tried to add 2 waypoints to a AH1 and they ended with the same waypoint ID, with the second one overriding the first one.
- What do you mean by the waypoint ID? The second element in the array that's returned? That should (and does) increment. The first one is the group name and stays the same. Check this demo mission that creates dynamic waypoints. --Kronzky 09:57, 29 December 2006 (CET)
- The 0 waypoint is reserved for the initial starting position. Try starting from 1. Perhaps the example should be updated. hoz
- ??? You don't specify the WP index in the addWaypoint command. ArmA automatically adds the new one behind the last current one. The zero in the argument (and in the example) is the placement radius. Or which zero are you referring to? Kronzky
- Your right, I'm mixing it up with another command. :) hoz
- ??? You don't specify the WP index in the addWaypoint command. ArmA automatically adds the new one behind the last current one. The zero in the argument (and in the example) is the placement radius. Or which zero are you referring to? Kronzky
- The 0 waypoint is reserved for the initial starting position. Try starting from 1. Perhaps the example should be updated. hoz
Notes
I moved the note here, it could use some cleaning up(punctuation,typos). Also the example seems a bit drawn out.
Example 1: easy use of this command to move a unit(group) to another unit.
Put in Group leader's Init field:(the group that is to move)
gotogroup=group this
Name the unit or object that you want this unit(group) to move to. I named a soldier Bobby.
Make a trigger that will send the gotogroup to Bobby. (Use radio Bravo)
In the trigger's Onact section put this code:
WP=gotogroup AddWayPoint [GetPos bobby,0];[gotogroup,0] setWaypointType "MOVE"