OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: XDFBlacky on 28 May 2006, 22:10:40
-
Hi guys,
I am still kind of new to this so...
How do I use 3 different objectives/triggers to end a mission?
I have three objectives and once they are completed ("1" objStatus, and two and three), I would like to end using end#1.
I have used CHOFPSE to create the mission briefing and init (two objectives are hidden).
I also need to hide a marker until the second objective = active.
Thanks in advance. ??? :'(
-
variables. global variables.
3 global variables called obj1, obj2 and obj3. in the init.sqs file set them all to false. when the first objective is completed, in whatever trigger senses it put obj1 = true. same with the second and third.
in your end trigger condition field, put
obj1 and obj2 and obj3
that simple.
hiding a marker. find out what type it is (warning, objective, target, etc) and remember. then in the init.sqs file set its type to empty, like this
"my_marker" setmarkertype "empty"
it will vanish, but it will still be there. when you want it to appear again, reset its type back to what it was.
-
Thanks so much for your help with this.
I lost 8hrs last night cause i tried to figure it out myself.
So glad you guys are back in business.
I did what you said and it all looks good so far, about to PBO and test on the server...
How do I set the MarkerType back to "Marker"?
Presume I have to script it? For instance, trigger calls script 'marker.sqs' and marker.sqs has something similar to:
Start
"CROSS" (where markername is cross) setMarkerType "Marker" (where marker is the type of marker used)
End
Does this look something like how it should be? ???
Thanks again. :-\
-
Looks good to me.
Oh, and wasn't there an easy way for multiple end conditions? I thought you just have to setup three triggers of type End1 and then they all would have to be activated for the mission to end.
-
it depends on what the trigger does. if it's an area the player must get into to complete an objective, you can put
"marker_name" setmarkertype "marker"
in the 'on activation' field of the trigger. same goes for a timer trigger... pretty much any kind of trigger really. yes you can script it, exactly as you've described, but popping the command line into a trigger saves time and memory.
-
Thanks for that both of you,
when I did try entering that data into a trigger on activation line,
I got a syntax error ie: On Activation: trigger1=true; trigger2 =true; hint "displays message"; "CROSS" setMarkerType "Marker"; trigger=true..............
My result was: On Activation: trigger1=true; trigger2 =true; hint "displays message"; "CROSS" setMarkerType "Marker"# expected bool?; trigger=true..............
So, short of denying memory and running a script, what do I do Oh Wonderous One?
I am quite impressed with you guys and your knowledge. Thanks heaps. ;D
-
see the attached missionette for how to do this one.
[attachment deleted by admin]