Home   Help Search Login Register  

Author Topic: Kill zone using array. How?  (Read 724 times)

0 Members and 2 Guests are viewing this topic.

Cap

  • Guest
Kill zone using array. How?
« on: 23 Mar 2003, 15:49:29 »
Right my prob is that i need to make a kill zone that will kill you if you leave it. I want to do this using as few triggers as possible (not 1 for each soldier).

This is as far as i have got, and i know i am soooo close but cant figure it out please help.......

TRIGGER 1 (this is the 1 I am using as the array)

Axis a: 5000          Axis b: 5000
Activation: Anybody      Present       Repetedly
Text: my list           Name: mylist

TRIGGER 2 (this is the kill zone)

Axis a: 1500           Axis b: 1500
Activation: Anybody       not present         Repetedly
On Activation: "_x setdammage 5" foreach mylist


That is what i got but it doesn't work please help.

Thanks in  Advance (and later if you are luckey enough)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Kill zone using array. How?
« Reply #1 on: 23 Mar 2003, 17:01:02 »
May i lead you to the editors depot pending list, where i've
a pending "no fire zone" tutorial.

This works as follows:

you enter the zone and must not fire a shot or you'll be
dammaged to be only able to crowch anymore.

If you leave the no fire zone, you can shoot as manny
bullets as you want.

OK, this is not exactly what you were asking for, but the method
in general is the same.

Have a look to there and check out the 5 triggers i've been
using for that.

If you have some more questions on how to alter it for your
idea, just post 'em here  ;)

btw - when you hold your mouse over the file it says "deleted",
but when you click on it to download - it works.

:edit - ah yeah here's the direct link to the pending list:

http://www.ofpec.com/editors/list.php?show=pending

hope this helps

~S~ CD
« Last Edit: 23 Mar 2003, 17:10:30 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Cap

  • Guest
Re:Kill zone using array. How?
« Reply #2 on: 23 Mar 2003, 18:28:21 »
Ahh thanks Chris_Death that helped fix part of my problem. Which was that i had...

"_x setdammage 5" foreach mylist

when it should of been...

"_x setdammage 5" foreach list mylist

but now i can only die if i am inside the trigger mylist (and i will die straight away). I have tried changing things about but i cant do it.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Kill zone using array. How?
« Reply #3 on: 24 Mar 2003, 01:39:16 »
OK, you seem to be looking at the wrong corner of my
suggestion  ;)

I think you are talking about my way to add eventhandlers to
units inside the no fire zone.

What i meant for you to use is:

That part, where i'm removing the eventhandlers from every soldier, who leaves the no fire zone.

This is my original code:

Code: [Select]
Trigger 1: the nofire-zone trigger


size: as big as you want your nofire-zone (e.g: 20/20)

activation: anybody/present/once

name: triggerA

condition: this

Trigger 2: the outer nofire-zone trigger (place it at the same spot, where the nofire-zone trigger is)


size: bigger than the nofire-zone trigger (e.g: 40/40)

activation: anybody/present/once

name: triggerB

condition this

Trigger 3: init-trigger


size: 0/0

activation: none/once

countdown: min: 0.1  /  max: 0.1  /  mid: 0.1

condition: true

onActivation: updlistA = true

Trigger 4: update nofire-zone trigger


size: 0/0

activation: none/repeatedly

countdown: min: 0.1  /  max: 0.1  /  mid: 0.1

condition: updlistA

onActivation: "_x addeventhandler [{fired}, {_this select 0 setDammage 0.95}]" forEach list triggerA; updlistB = true; updlistA = false

important note - the countdown is required to get this whole thing to work (strange OFP editor)

Trigger 5: allow fire outer nofire-zone


size: 0/0

activation: none/repeatedly

condition: updlistB

onActivation: nofire = list triggerB - list triggerA; "_x removealleventhandlers {fired}" forEach nofire; updlistB = false; updlistA = true


I'm gonna rewrite that now, so that you will be able to
use it for your mission.

This is the one you need (feel free to compare both for better
understanding what i meant):

Code: [Select]
Trigger 1: the inner zone trigger - the area where your units have to stay inside


size: as big as you want your nofire-zone (e.g: 500/500)

activation: anybody/present/once

name: triggerA

condition: this

Trigger 2: the outer zone trigger (place it at the same spot, where the inner zone trigger is) - this trigger is required
to create a referback for those units outside the inner trigger


size: bigger than the nofire-zone trigger (e.g: 550/550)

activation: anybody/present/once

name: triggerB

condition this

Trigger 3: init-trigger


size: 0/0

activation: none/once

countdown: min: 0.1  /  max: 0.1  /  mid: 0.1

condition: true

onActivation: updlistA = true

Trigger 4: timeout 0.1 then repeat the kill outer zone trigger

size: 0/0

activation: none/repeatedly

countdown: min: 0.1  /  max: 0.1  /  mid: 0.1

condition: updlistA

onActivation: updlistB = true; updlistA = false

important note - the countdown is required to get this whole thing to work (strange OFP editor)

Trigger 5: kill everybody outside the inner zone trigger

size: 0/0

activation: none/repeatedly

countdown: min: 0.1  /  max: 0.1  /  mid: 0.1

condition: updlistB

onActivation: outerzone = list triggerB - list triggerA; "_x setdammage 1" forEach outerzone; updlistB = false; updlistA = true

btw - still wondering why you are using "setdammage 5",
as with setdammage 1 the unit would have reached it's
highest dammage level => killed.

~S~ CD
« Last Edit: 24 Mar 2003, 01:42:04 by Chris Death »
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Cap

  • Guest
Re:Kill zone using array. How?
« Reply #4 on: 24 Mar 2003, 07:37:10 »
I have allways used setdammage 5 cos i was told once it made explosions on vechials bigger, plus nothing wrong with a bit of overkill to make sure the jobs done ;) .  Thanks your way seems to work, but i have done a killzone before with just 2 triggers that uses a lot less text, but your way seems to do it thanks.
« Last Edit: 24 Mar 2003, 07:38:20 by Cap »

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Kill zone using array. How?
« Reply #5 on: 24 Mar 2003, 10:28:05 »
setdammage 1 = setdammage 5 = setdammage 2,984
Plenty of reviewed ArmA missions for you to play