Home   Help Search Login Register  

Author Topic: Multiple Objectives  (Read 1581 times)

0 Members and 1 Guest are viewing this topic.

Offline Lawrence

  • Members
  • *
Multiple Objectives
« on: 12 Sep 2006, 14:11:22 »
I didn't know if I should have replied to the old topic regarding this or start a new one,

Did a search about having to complete multiple objectives to trigger an end. The specific thread wanted to know about something destroyed.  However, my triggers are if a certain unit has been in an area for a certain amount of time, then one of the objectives is complete. After this, the unit has to be in another area for a certain amount of time and so on. Can someone help me out with the scripting?

I'm thinking I can't just use a regular trigger, and will need a separate script for the countdown timing of the unit being in the area. If you can help, I appreciate it.

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Multiple Objectives
« Reply #1 on: 12 Sep 2006, 18:20:42 »
As i understand it the way "hold area A for 60 seconds then hold area B for 120 seconds..." and so on.

This can easely done by triggers only.

Create triggers for each area/objective. Set shape size to your needs. There must be some fields in the triggers menu called "Timeout" and 3 fields...as i remember called "min", "max" and...and...don't remember the third. Nonetheless, there you can set the time that has to pass for the trigger to fire. Put in each field the same value, as example 60 to get ther trigger activated after one minute.

Then, to set an objective to DONE, just put in the on activation line of each trigger

Code: [Select]
"X" objStatus "DONE"

where X stands for the respective objective.

Just a little hint:

If you group the trigger with your unit (works same as grouping units) you will have additional settings in the trigger setup, which lets you let the trigger fire only if this specific unit is in trigger area and not when any other unit of same side is present.


Hope, i could describe it clearly enough for you  :D

Myke

Offline Lawrence

  • Members
  • *
Re: Multiple Objectives
« Reply #2 on: 13 Sep 2006, 15:04:45 »
Yes, I did want a countdown style.

Currently my End trigger is that  unit reaching a certain place. If I'm correct, the method you're using is making it so that these objectives will just be set to complete in the debriefing once its over- but it isn't necessary to complete the end trigger.

I'd like to remove my current end trigger and make the end trigger dependent upon these 3 objectives be completed.

another question:
On the timeout trigger, is it "on activate" once the timeout period has passed? Or is it activated as soon as my unit is in the area?
So, when does it deactivate?
« Last Edit: 13 Sep 2006, 15:35:39 by Lawrence »

Offline myke13021

  • Contributing Member
  • **
  • Myke
Re: Multiple Objectives
« Reply #3 on: 13 Sep 2006, 18:43:05 »
I think i get your idea: objectives have to be completed and unit must be in "end zone".

This is very simple and just needs a few modifications of your existing stuff.

First, in your objective triggers expand your line to:

Code: [Select]
"X" objStatus "DONE"; objective_one true

i guess you see the way for all triggers.

Now for the end trigger. I guess you want some sort of extracting zone, say if unit is in trigger area AND objectives are completed, then win end.

First set up your end trigger as you need it (side, present status and so on).
Then, in the condition line inseert this line:

Code: [Select]
this AND objective_one AND objective_two.......

What happens now:
Your protect area triggers will set the objective to DONE and set a variable to true. Your end trigger will check if unit is present ("this" will refer to the general settings of the trigger) and all objectives are completed.


About the timed triggers, this works as follows: As soon a unit steps into the trigger it starts the countdown. If the unit steps out of the trigger area the countdown will be aborted...oh, one thing, set these triggers to repeatedly, as the unit may step out of the area. When the setted time is reached, the trigger will fire definately.