OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Iwesshome on 18 Apr 2003, 19:48:23
-
Hello all,
Is there a way to keep a player from venturing to far from a Mission Guideline that will tell them to keep on mission and if they don't after some time the mission will end?
Thanks,
IW
-
You could put a large "not present" trigger over the area you want them to stay in. If they venture outside of that area it could give them a warning. It would have to be a repeating trigger.
-
Ok,
I understand what you are saying.... How could you also tag with it a way to end the mission if they dont go back into your designated area?
-
You could put a slightly larger trigger directly over the first one. Maybe 50-100 meters larger. If they leave that area then they "just happen" to step on a mine. ;D
mine="shell105" camcreate getpos player
put that in the activation field of the second, larger trigger
BOOM :o
Correction:
That will only work if there are NO units of that side in the trigger. If the player is an EAST soldier and there is any other east unit in the trigger area, it won't activate.
Try this instead.
Name the triggers something like this :
trigger1 and trigger2
In each condition field place this:
!(player in list trigger1)
-or-
!(player in list trigger2)
This will make it so that only if the player is outside of the trigger area it will activate.
Hope this helps :)
-
Althougth deaddog is right, conceptutally I disagree. One of OFP's great strengths is openness and flexibility. Your mission should take full account of all possible routes taken by the player. Whatever the player does - I mean that in a logically complete sense, not just the things that you can think of - then there should be good/bad consequences depending on what he has done and whether it makes sense in the context of them mission.
Why do you want the player to get a mission failed if he leaves a certain area? You are merely the mission designer, who are you to say where the player should and should not go?
-
There are certain parts of a mission I am trying to create where you have to hold certain areas in an order and per your orders given to you by radio. The majority of the mission is free reign but those critical portions I want to create consequences if orders are not followed.
I'll show flexibility... I promise ;D
-
Also I would like the boundaries to shift new locations when orders are given which I think could be done by switch triggers... that I have no knowledge about.
Directions on how to create switch triggers ???
-
Fair enough. (Just as long as you think about it, that's the point I'm making :))
It's not really a switch trigger problem. What you need is a bunch of triggers and a bunch of variables.
For example, after a certain order is issued the player must not leave a certain area (say, the town he is supposed to defend)
When the order is issued
Order1=true
Create a trigger over the town
Activation: player not present (you know about linking triggers and units in groups mode, right?)
Condition: Order1 and this
On activation: player is toast (by what ever means takes your fancy)
[you could make it Type: End#2 (mission failed text) if you like]
Create triggers and variables as appropriate. You can move triggers using setPos if that helps.
Switch triggers are easy to create - just make the type switch - and they are really to do with waypoints. If you want to know more, have a search .... you could do worse than search (use the search button at the top of this screen, in that row) the forum on macguba and switch, I've answered that question a hundred times.
-
I'm scratching my head :help:
When the order is issued
Order1=true
Create a trigger over the town Yep I am good
Activation: player not present (you know about linking triggers and units in groups mode, right?)Yep I am good
Condition: Order1 I don't understand conditions
On activation: player is toast (by what ever means takes your fancy)
[you could make it Type: End#2 (mission failed text) if you like]Yep I am good
Create triggers and variables as appropriate. You can move triggers using setPos if that helps.
Let me go run home and try this and I forgot about that dang search button again ;D If run into some problems... well you know me I will be back.
Thanks Macguba & Deaddog
IW
-
Right, conditions.
There is only one way to make a trigger fire. And that is when the conditions in the condition line are satisfied. In other words, you've been using the condition line for ages, you just didn't know it.
If you look at the condition line when you first create a new trigger, you will see that it says "this". That means that the trigger will fire when the conditions in the Activation box (East not present or whatever) are met.
However, you can change it. You don't need to use the activation box at all. For example, if you wanted a trigger to fire at the start of a mission (very useful for testing triggers) you could simply have the following in the condition line:-
true
If you want the trigger to fire when a variable becomes true, then you write the variable in the condition line. You don't need towrite "when x is true", the trigger understands all that, you just need to write the name of the variable. It could be x, or it could be
Order1
The condition line is simply a boolean: meaning that when it is false, nothing will happen. When it is true, the trigger will fire.
You can of course combine things with boolean logic. For example, if you wanted a trigger to fire when east was in the trigger area, but only if a variable was true, then you would set the Activation box to east present as usual, and inthe condition line write
this and variable1
Alternatively, if you wanted it to fire when either was true, you would write
this or variable1
So in this particular example you have one trigger that has
On activation: Order1=true
for when the order is issued. The trigger over the town has ... well you've seen the previous post. Hopefully it makes more sense now. Just give it a try and see how you get on. Ask if I haven't been clear.
-
Ok.... Here are my first part of the results from testing.
Deadog's Version
Did exactly what you said and when right when I went to preview it I was sent flying 150 feet straight into the air to my death like the coyote strapped to an Acme rocket ;D
Macguba's Version
First attempt to get this work failed... will try again and if not successful I will post the part of I am testing to see if I have it set up wrong.
IW