Home   Help Search Login Register  

Author Topic: Death Trigger?  (Read 470 times)

0 Members and 1 Guest are viewing this topic.

mr.sert

  • Guest
Death Trigger?
« on: 29 Apr 2003, 09:26:38 »
I want to create a trigger that once you trigger it you slowly begin to die, but also if you move away from that area you will not continue to die, or get injured. What would be the easiest way to do this? Thanks in advance.........


- Mr. Sert

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Death Trigger?
« Reply #1 on: 29 Apr 2003, 10:32:37 »
Create the trigger, group it with the player so you get the special options in the on activation box.    Set it to repeatedly.

On Activation:    poison=true; [] exec "poisonScript.sqs"
On deactivation:   poison=false

In init.sqs write

poison=false

Name the player loon1.  Now create your script file

; this script slowly poisons the player to death while he is in the trigger area

#loop
?not poison:exit
?getdammmage loon1 >=0.96:loon1 setdammage 0
loon1 setdammage ((getdammage loon1)+0.05)
~1
goto "loop"


Syntax not guaranteed - check it.   This is not a working script, its just a sketch for you to use as a starting point.

You can change the parameters to suit yourself:  with this script loon1 will die after about 20 seconds but you can make it as fast or slow as you like.







Plenty of reviewed ArmA missions for you to play

mr.sert

  • Guest
Re:Death Trigger?
« Reply #2 on: 29 Apr 2003, 10:48:37 »
Thanks for the help....



- Mr. Sert

deaddog

  • Guest
Re:Death Trigger?
« Reply #3 on: 29 Apr 2003, 17:58:00 »
That's a cool idea... :toocool:

The only problem I see is that loon1 may not die if his "starting" damage is something like .11 or .02, etc .  When his damage is >=.96 and <1 he is set healthy again.
« Last Edit: 29 Apr 2003, 18:01:11 by deaddog »