Home   Help Search Login Register  

Author Topic: ?Three objectives to end misssion  (Read 1151 times)

0 Members and 1 Guest are viewing this topic.

XDFBlacky

  • Guest
?Three objectives to end misssion
« 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. ??? :'(

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: ?Three objectives to end misssion
« Reply #1 on: 28 May 2006, 22:15:36 »
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

Code: [Select]
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

Code: [Select]
"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.

XDFBlacky

  • Guest
Re: ?Three objectives to end misssion
« Reply #2 on: 29 May 2006, 03:23:33 »
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. :-\
« Last Edit: 29 May 2006, 03:27:09 by Andre Blackall »

Offline Trapper

  • Honoured Contributor
  • ***
  • I'm a llama!
Re: ?Three objectives to end misssion
« Reply #3 on: 29 May 2006, 07:59:09 »
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.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: ?Three objectives to end misssion
« Reply #4 on: 29 May 2006, 09:13:54 »
it depends on what the trigger does. if it's an area the player must get into to complete an objective, you can put

Code: [Select]
"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.

XDFBlacky

  • Guest
Re: ?Three objectives to end misssion
« Reply #5 on: 29 May 2006, 10:42:23 »
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

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: ?Three objectives to end misssion
« Reply #6 on: 29 May 2006, 11:13:35 »
see the attached missionette for how to do this one.

[attachment deleted by admin]