OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: BHD Mod on 31 Mar 2003, 05:30:45

Title: Waypints ending a mission
Post by: BHD Mod on 31 Mar 2003, 05:30:45
        How do I make a waypoint end a mission?
Title: Re:Waypints ending a mission
Post by: Ness on 31 Mar 2003, 06:31:20
As far as I know it's a trigger to do that. The best way I find is to put the trigger over the specific waypoint you want to end the mission and sync them.
Title: Re:Waypints ending a mission
Post by: macguba on 31 Mar 2003, 11:05:59
You can't.       Only a trigger (type End#1 or End#2 etc) can end a mission.    

What is even more important is that you mustn't.     Never use waypoints in a mission to make things happen, there is too much that can go wrong.     For a start, if the player is playing in Veteran mode, he won't even know there is a waypoint there.    Or he may have decided to do the mission in a different way.       Waypoints are just guides for players using Cadet mode, no more.

Use a trigger instead.     What are you trying to do exactly?   Is the mission supposed to end when the player gets to a certain place?
Title: Re:Waypints ending a mission
Post by: Chris Death on 31 Mar 2003, 14:12:50
Mac - did you ever think about AI waypoint ending the mission
when player couldn't prevent him from reaching the wp?  ;D

Well, to end a mission by a waypoint you still need the
waypoint and a trigger (type: end/loose/end#1....2...etc).

In this trigger's condition field you need a boolean, which you
change to true, in the waypoint's activation field.

trigger:
size: 0/0
activation: none
type: end#1
condition: finale

waypoint:
on Activation: finale = true

Now when the unit reaches the waypoint, it says finale=true
and then the trigger goes active and ends the mission.

~S~ CD
Title: Re:Waypints ending a mission
Post by: macguba on 31 Mar 2003, 14:31:12
True, true ..... and what you have said is the best way to do it.   But if you are doing that you also need another trigger:-

type:   End#2
Condition:    (not alive (loon1)) or (not (canMove scud1)) or something

In other words, if the mission ends when the loon gets to the waypoint, it must also end if he cannot get to the waypoint.    Maybe he is dead, fleeing, wounded in the legs, vehicle disabled .....   Otherwise you would have a mission that couldn't end.  Which is no fun at all.

So, for the avoidance of doubt ....

Title: Re:Waypints ending a mission
Post by: OFPWiZard on 31 Mar 2003, 14:55:30
Another way is to Synchronize a trigger to a waypoint that can be activated when you "activate it.  Like you go through a mission and you need to destroy something, the only way to beat the mission is to get to the other waypoint, so you destroy whatever you needed to destroy and whenever the waypoint becomes activated the mission will end, but its kind of the same using a trigger because you are using the trigger with the help of the waypoint (trigger will be filled upi like type: End #1) or you can make switch trigger to make the trigger skip that waypoint whitch was your frist End (End #1) to go to another waypoint... after a while the 5th End trigger (End #5) is activated you and ywin because there aren't anymore afterwords (unless you loose).  so there are five possible ways to end if you do it that wat.

sounds confusing? ...  i didn't sleep all last night, lol, not even tired now... but hungry... anyways thats something you could do.

Hint:  If you want to loose by having someone die on your team you can do this:

make a trigger and put this in the Conditiion Field:  
NOT alive unitname

If you want more then one put this

NOT alive unitname AND NOT alive unitname

also i think you could do a setEndMission or forceEnd (whatever) command in the On Activation Field of a waypoint... maybe

bye

NOTE:  like macguba said, and i was thinking of the same thing (i don't do it) its better to use a trigger ending the mission...
Quote
Never use waypoints in a mission to make things happen, there is too much that can go wrong.    For a start, if the player is playing in Veteran mode, he won't even know there is a waypoint there.    Or he may have decided to do the mission in a different way.      Waypoints are just guides for players using Cadet mode, no more.

Title: Re:Waypints ending a mission
Post by: Artak on 31 Mar 2003, 14:57:52
how about the forceend command? anyone got anything to say about that?
Title: Re:Waypints ending a mission
Post by: Agent Fire on 31 Mar 2003, 20:59:52
WHY WON'T A PLAYER ON VETERAN MODE SEE A WAYPOINT ON ALWAYS SHOW?
Title: Re:Waypints ending a mission
Post by: Artak on 31 Mar 2003, 22:09:29
Because it's veteran mode and you don't get to see waypoints in veteran mode.. because it's so veteran.
Title: Re:Waypints ending a mission
Post by: macguba on 31 Mar 2003, 23:14:34
"Always show" refers to whether the waypoint will appear on the map.   It does not refer to the yellow boxes that appear on the normal view.

If they are on the map, a player using Veteran mode might indeed try to follow them.  However, he has no way of telling what type of waypoints they are or whether he has completed them.

Lots of people play only in Veteran mode.    Lots of people play only in Cadet.   A competant mission designer will cater for both.