OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: PPSDRNKR on 13 Feb 2004, 23:45:29

Title: Waypoints
Post by: PPSDRNKR on 13 Feb 2004, 23:45:29
How do you make a waypoint in the editor that doesn't go away untill you get a meter in front of it.  Because I'm making a mission that needy ou to get to the exact point not like 500 meters away like when I test it.
Title: Re:Waypoints
Post by: Cap on 14 Feb 2004, 01:03:36
Couldn't you just use a trigger over the waypoint to detect when you get there.  Similarly you could place a game logic, object or marker and make a script...

---distance.sqs---

v1 = false

#Loop
~1
?player1 distance object1 < 5: Goto "Player_There"
Goto "Loop"

#Player_There

v1 = true


... I think this will do it just get someone to check it i aint played ofp 4 ages

Hope this helps
Title: Re:Waypoints
Post by: macguba on 15 Feb 2004, 13:37:57
Remember that a player in Veteran mode won't even know that the waypoint is there.
Title: Re:Waypoints
Post by: Shiznan on 20 Feb 2004, 14:55:57
Cap, will that also make AI go to the exact point of the waypoint? I am making a mission and i have the same problem as PPSDRNKR but I need the AI to go to the exact spot, not the player.
Title: Re:Waypoints
Post by: macguba on 20 Feb 2004, 15:46:10
If you need the AI to go to an exact spot, then a waypoint is no good:   waypoints are completed when the group gets to within a certain distance.    What I suggest is a waypoint at the exact spot, to get the group close, then runa  script from the waypoint

; script to make the loon move to the right spot

#lop
leader grp1 doMove getPos GP_1
~2
? GL_1 distance leader grp1 < 2: goto "end"
goto "lop"

#end
; insert the consequences here
exit


Syntax not guaranteed but the idea is that as soon as the WP is completed the group leader (don't use a named loon in case he has been killed) will go to the right place and when he gets there the consequences occur.
Title: Re:Waypoints
Post by: Shiznan on 22 Feb 2004, 22:08:42
Thanks. I'll try it immediately. I've not been able to get anything else to work because I am using choppers and they like to be uncooperative with waypoints, so thanks again. ;D