Home   Help Search Login Register  

Author Topic: Need help with a remove trigger command or countdown  (Read 1519 times)

0 Members and 2 Guests are viewing this topic.

Sapper

  • Guest
I searched for this and couldn't find it any way I tried... after about 20 minutes of trying to find it I give up and bring it to you here.

I've been making modifications to a map of mine....here is what I'm trying to do.

A.) I'm placing a timer to count down from 5 minutes...
B.) I have a trigger killing all units that enter the area...
C.) At the end of the 5 minutes I want the trigger to go away...

Any quick answers on this?

Thanks for the help in advance.   ;)
« Last Edit: 07 Jan 2003, 06:12:36 by Sapper »

Sapper

  • Guest
Re:Need help with remove trigger command
« Reply #1 on: 07 Jan 2003, 05:49:31 »
I'm also aware that there is a way to place a timer within the trigger counting down ?!?  How would I do that?

Also how would I make the trigger SAY when it's deactivated via a message on the screen?

Thanks again for the help...

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Need help with a remove trigger command or countdown
« Reply #2 on: 07 Jan 2003, 17:17:25 »
Well, you seem to know something about editing so I'll make it short and simple ;) In your killing-people trigger, just add for instance !endKill in the condition field, which obviously means that as long as the variable endKill is false (not=!), the trigger will keep going. I suppose you have something else there, so just make it a AND !endKill.

anyhow, in the countdown trigger, put endKill=true in the on Activation field, and ta-daa, the killing trigger should stop working ;)

As to messaging, well, I suppose you could do it through a titleText, as so:

TitleText["The killing field is disabled!", "PLAIN"]

which would display the text in white in the centre of your screen. If you prefer radio messages you could for instance have Base or Papa Bear say it (find out how to in the ed.depot or search the forums...). Oh, right, you but above in the On Activation field together with your endKill=true :) remember the ;

right, that should be all...g'luck!

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

Sapper

  • Guest
Re:Need help with a remove trigger command or countdown
« Reply #3 on: 08 Jan 2003, 02:03:20 »
Still not working....dang
I changed the timeIsUp = true to endKill = true in the countdown.sqs file.  I'm using Caelib's Countdown 1.2 method.

The other problem may be that it's my killingfield...
Condition I put                           This; !endKill
On activation I put                     "_X SetDammage 1" Foreach ThisList
So either my putting the endkill = true in the countdown.sqs file is a problem or I'll need somehting besides !endKill or a different On Activation for my killing trigger.

So instead of !endKill in the condition field of the trigger I might need something different?!?

As far as adding the text it is solved by Caelib's script, instead if it saying the Time has expired I set it to say The Killing Field has been disabled.

Yeah I do a little about mission editing but only what I've taught myself or friends have pointed out for me.  I thank you Wolfrug for the response and assistance.
« Last Edit: 08 Jan 2003, 02:10:28 by Sapper »

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:Need help with a remove trigger command or countdown
« Reply #4 on: 09 Jan 2003, 00:27:51 »
hehe, that's the thing you see: for your killing field trigger to work, you'll need to activate it too. Now, the thing it'll do is kill everything in the list, i.e, everything that the trigger "picks up", i.e whatever you've put in the "activated by" field. So, if you put "West" there, it'll kill all west units entering the field, "east" and "Resistance" the same. If you want a total killing, try "Anything" and pretty much anything entering will die ;)

So, you've got it set to repeating, right? Well, in that case all you'll need (I think) is a AND this after the !endkill, so cond'll look like:

cond: !endKill AND this

oh, and you didn't need to change the name of the variable, it's really irrelevant (as long as they match up). My name was just an example.

would test this but, but...maybe later in case this doesn't work either. Good luck anyhow!  :D


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

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Need help with a remove trigger command or countdown
« Reply #5 on: 09 Jan 2003, 00:31:47 »
still haven't got all used to that avy there, wolfy  ::) old punk!

Sapper

  • Guest
Re:Need help with a remove trigger command or countdown
« Reply #6 on: 09 Jan 2003, 09:07:26 »
Hate to be a pain... but it's still not working.  If I put the !endKill into the condition the trigger doesn't work at all and if I don't put it in the trigger it always works.  Let me lay out how I have set up....

Okay in my Killing Trigger I have this set up
Activation is ANYBODY and set to REPEATEDLY
PRESENT and COUNTDOWN are also chosen even though I don't think countdown will do anything this way...
Type: NONE
Text: empty
Name: kill
Condition: !endKill AND this
On activation: "_X SetDammage 1" Foreach ThisList
On deactivation: empty

on the second page of the trigger I didn't change anything....

What does the COUNTDOWN  TIMEOUT  min:  max:  and mid: mean on these triggers??  I looked but didn't find much on it.

For the Countdown timer I used this one located on your site;

Count-down script
by Caelib

Snippet complexity: 2 (Simple)

Recommended for OFP version 1.46.

Views: 98

   

REVISION HISTORY:
1.0 - Initial Release
1.1 - Totally overhauled the script allowing it to be much more robust
1.2 - Various improvements to the script, including parameter validation

PURPOSE:
This script can be employed to create an on-screen countdown timer in a custom mission. The script is highly configurable and should meet any of your needs [should you need to keep track of time in your mission].

NOTES:
This script is open source.  Feel free to copy and distribute as you like. However, please leave my credentials in-place and at least give me some credit if you use my script in a mission that you distribute.  Thanks and enjoy the script!  One last thing, please don't email me asking for help debugging this, or any other scripts ... that's what the forums at OFPEC are for! Enjoy.

USAGE:
To use this script, simply place the following command in a unit, vehicle, or aircraft's "Initialization" field or in an "onActivation" field. Keep in mind that all seven parameters are required.

SYNTAX:
[a, b, c, d, e, f, g] exec "countDown.sqs";

a = Number of hours.  Valid values are 0 - 99
b = Number of minutes.  Valid values are 0 - 59
c = Number of seconds.  Valid values are 0 - 59
d = In minutes, how often to display timer.  Valid values are:
    -1 = NEVER show [only use this if you simply want a script timer]
    0 = always show
    1 = Once per minute
    5 = Once every 5 minutes
    10 = Once every 10 minutes
    15 = Once every 15 minutes
    30 = Once every 30 minutes
e = Threshold in minutes to always show.  Basically, what e is for is that
    when the time starts getting low, when do you want to always show timer.
    Valid values are 0 - 59.
f = Label for remaining time. Use "" for no label.
g = Text to display when mission time expires. Use "" for no message.

EXAMPLE:
[1, 30, 15, 5, 10, "Time Remaining:", "Time Expired!"] exec "countDown.sqs";

This would set the mission time to 1 hour, 30 minutes, and 15 seconds. Once every 5 minutes, the user would be displayed on-screen the time remainging for the mission.  When the mission time remaining reaches 10 minutes, the time would continuously count-down on-screen.

OTHER:
You will want to add a trigger [or script] with a condition "timeIsUp" that ends the mission or does whatever when the mission time has expired.

Finally, there is an additional feature that allows you to show the time remaining on-demand from within another script or on a trigger.  Just remember to "deactivate" the timer in the same fashion that you triggered it ... the best way to accomplish this is via radio "go codes":

showTimeRemaining=true [activates timer and OVERRIDES ALL PARAMETERS]
showTimeRemaining=false [de-activates timer]

----------SO--------------
In the SQS file I changed timeIsUp = true to endKill = true
that SHOULD well the !endkill to become true and stop the trigger....

Is there a different way of doing the countdown timer?

Thanks for all your patience, but I brought this problem to the experts here cause I racked my brains trying to fix it.  I appreciate the help I've gotten so far.
« Last Edit: 09 Jan 2003, 09:16:55 by Sapper »