Home   Help Search Login Register  

Author Topic: Timed out trigger related to objective  (Read 1755 times)

0 Members and 1 Guest are viewing this topic.

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Timed out trigger related to objective
« on: 19 Jul 2008, 10:59:33 »
Hi everybody

have a small problem with a time out trigger related to an objective. I want the player to reach a certain trigger area within 6 min otherwise the objective fails. In case he reaches the trigger area in time the objective is done.
Trigger is set to

Activation: None
Timeout 480 min-mid-max
Condition: !(player in thisList)
OnActivation: "2" objStatus "Failed" explo = true

I just can't get it to work. Evertime I reach the trigger area in time the trigger activates the 2nd objective failed. I tried substitute player with an assigned variable but same result. Is there anybody who can point me to a solution.
Thanks in advance
nettrucker :dunno:

Offline Carroll

  • Members
  • *
  • Mission Designer (MP-"well tryin to capiche"
Re: Timed out trigger related to objective
« Reply #1 on: 19 Jul 2008, 11:22:06 »
Looking at your problem you could try adding a 2nd trigger to detect the objStatus as "DONE", and also use it to delete the "failed" trigger so it no longer exists...

for example:
- if Player is not present in trigger #1 area after 361secs (ie "2" objStatus "FAILED"; deleteVehicle trig2)
- if Player is present in trigger #2 area 360secs (ie "2" objStatus "DONE"; deleteVehicle trig1)

however there are probably other ways i've not tried b4
« Last Edit: 19 Jul 2008, 12:45:14 by Carroll »

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Timed out trigger related to objective
« Reply #2 on: 19 Jul 2008, 13:08:45 »
If you have activation none, then thisList will always be empty.

You could do it with two triggers, but I think it is simpler to do this (sorry, untested, but you should get the general idea):

Activation: west present once (or whatever the player side is)
Timeout: none
Condition: (player in thisList) or (time > 480)
OnActivation: if (time > 480) then { "2" objStatus "Failed"; explo = true } else {  "2" objStatus "Done"; explo = false };
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: Timed out trigger related to objective
« Reply #3 on: 19 Jul 2008, 14:19:38 »
Thanks spooner
I gonna try it out. My main problem is the activation of that trigger. What I want to achieve is that after 6 min the trigger area is checked if the player is present. In case he's not the objective fails. My problems is the activation. I can't let the player activate it. Because the countdown would start when the player reached the area he's ordered to.

west present once is not an option because in the trigger area there are already west units present from the beginning. Don't know how to activate it.
nettrucker ::)

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Timed out trigger related to objective
« Reply #4 on: 19 Jul 2008, 14:41:10 »
The group the trigger with the player so that only player presence will activate it.

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: Timed out trigger related to objective
« Reply #5 on: 22 Jul 2008, 23:27:46 »
Hi
I finally figured the trigger settings how to make it work for what I wanted to achieve
The only thing I changed in the suggestion by Spooner
was the condition

Code: [Select]
(time > 600) and ! (player in thisList)
It seems to work.
Thanks for the advice.
nettrucker :D

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Timed out trigger related to objective
« Reply #6 on: 23 Jul 2008, 01:03:42 »
That would only trigger if the mission was 8 minutes in AND the player had left the area. Not quite what you said you wanted (That the objective should be DONE when the player arrived at an area, but FAILED if it gets to 8 minutes without the player reaching that area). Also, if you used my on-act, then you'd never, ever succeed, since time would always have run out by the time the condition was met. I'm a bit confused...
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re: Timed out trigger related to objective
« Reply #7 on: 23 Jul 2008, 09:24:31 »
Also we don't want to use the Time command, since unless I'm mistaken, the Time command still resets to 0 whenever you load a savepoint in ArmA (like in OFP). :) For this reason alone it's better to either spawn a little script that uses the internal _time command (which supposedly works even past save/loads), or to use the min/max/med entries on triggers, which also supposedly work past save/loads.

This trigger might work:

Activation: Anybody
Countdown: 480/480/480
Condition: true
On Activation: if (player in thisList) then {"2" objStatus "DONE" explo = false} else {"2" objStatus "Failed" explo = true};

In this way, the countdown will start right on mission start, and when it ends it does a check to see if the player is present. If he is, then everything is good, if he isn't, things explode. If there's something he needs to do (say, kill a terrorist), you can just add that to the condition line: true && alive terrorist1. That way, once the terrorist is dead, the trigger will never activate (and you can add the "2" objstatus "done" stuff in another trigger).

Hope that works.

Wolfrug out.
"When 900 years YOU reach, look as good you will not!"

Offline Spooner

  • Members
  • *
  • Mostly useless
    • Community Base Addons
Re: Timed out trigger related to objective
« Reply #8 on: 23 Jul 2008, 18:02:00 »
Wolfrug, what your trigger does is succeed if the player is in the zone after 480 seconds and fail if he isn't. Not only does he have to wait until the timer runs out to win or lose, but if he wanders off after getting to the zone, then he will lose. That isn't the same as success at the moment of reaching the zone and failure on if he doesn't get there in time.

Sorry about the time thing. I mostly work on managing the headache that is MP, so I probably don't put in as much time at dealing with SP-specific issues ;P
[Arma 2] CBA: Community Base Addons
[Arma 1] SPON Core (including links to my other scripts)

Offline nettrucker

  • Members
  • *
  • Too young to die-OFP Campaign by TOY & nettrucker
Re: Timed out trigger related to objective
« Reply #9 on: 23 Jul 2008, 22:03:50 »
Hi everybody
Thanks for all the replies and suggestions.

Quote
(That the objective should be DONE when the player arrived at an area, but FAILED if it gets to 8 minutes without the player reaching that area).


That is correct

Well I better explain what I wanted to achieve. This mission is a Paratroop attack on Rahmadi Airfield. The player will be ordered to take some men and defend the ammo depot meanwhile enemy troops are raining from the sky. The player will be forced to advance under fire to the middle of the airfield to accomplish the order. He has ten minutes of time to reach the ammo depot, if he can't make it in time the objective fails. I put a trigger around the ammo depot which should activate after ten minutes and check if the player is present in the trigger area. Now I tried the solution you posted Spooner, but the condition was wrong I suppose, 'cause everytime I reached the trigger area within the time limit of ten minutes the trigger activated 2nd objective failed. And it should have been activated 2nd objective done. So therefore I changed the condition as posted above it seems to work but I still have to do an accurate testing for being honest, hadn't had the time to care of this issue during the last days.
I'll report back asap.
Thank you guys.
nettrucker :D