Home   Help Search Login Register  

Author Topic: Killzone  (Read 1074 times)

0 Members and 1 Guest are viewing this topic.

Egwal

  • Guest
Killzone
« on: 11 Jan 2004, 20:39:04 »
An MP mission. I want to set an area, and if a player leaves it, firs he will get a small hint; eg you have crossed the border turn back at once. And if he still continues, he will get killed. How do I do this?
Thanks in advance.

gundernak

  • Guest
Re:Killzone
« Reply #1 on: 11 Jan 2004, 22:44:04 »
make an elliptic  trigger, size as you want, as big as it can work as the the border.

name your unit to myunit

place your unit inside the trigger

group the trigger with the unit

set the trigger to ' not present'

put into the 'on activation' field: hint "write your text here"; dudeLeftBorder = true

put a game logic close to the center of the trigger

name it 'mylogic'

set up another trigger, does not matter where (size 0, type none, activation none),

put this into the 'condition' field:

myunit distance mylogic > 200 and dudeLeftBorder

'on activation': myunit setdammage 1

you can set 'distance 200' as far as you want the unit to die

write this into your init.sqs file (if it does not exist, create it to the folder of you own mission):

dudeLeftBorder = false
 :P

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Killzone
« Reply #2 on: 12 Jan 2004, 02:55:02 »
Thats 1 way, the way I use doesn't require a specific player name:
make a trigger of the appropriate size
activated by anyone, present, repeatedly
effects titles, text, "whatever text"
Make another trigger slightly smaller in width
place in the same spot as the 1st trigger
activated by anyone, present, repeatedly
on activation  "_x Setdammage 1" Foreach thislist;

This will give the player a warning first, and will kill him if he continues

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Killzone
« Reply #3 on: 12 Jan 2004, 03:15:09 »
Zombie, nice method, you're using to kill everyone inside
that area, where they are supposed to stay in  ;D

He's been asking for a "not to be left area"


EgWal, you may need at least two triggers for that:

trigger 1:

size: as big as you want
activation: anybody present/once
triggername: triggerA


trigger 2:

size: bigger than trigger 1
activation: anybody present/once
triggername: triggerB

Now you need to instantly update the kill list by subtracting
the guys in triggerA from the guys in triggerB

look: triggerB contains everyone inside triggerB + everyone
inside triggerA

triggerA only contains the guys inside triggerA

If you say: killlist = list triggerB - list triggerA
you'll have all guys, who have left triggerA
now if you continue with: "_x setdammage 1" forEach killlist
you gonna lay 'em down on the ground.

Off course you need to initialize: killlist in the init.sqs, or
the whole: killlist = list triggerB - list triggerA will not work.
Best done in your init.sqs

The instant update + setdammage you can do in either another
trigger, or in a script.

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Zell

  • Guest
Re:Killzone
« Reply #4 on: 12 Jan 2004, 10:03:21 »
lol nice zombie hehe
« Last Edit: 12 Jan 2004, 10:04:03 by Zell »

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Killzone
« Reply #5 on: 12 Jan 2004, 14:33:10 »
Hmmm, I tried to post an example of my method, but I can't seem to get it to upload.  Let me try to explain it better then:
Using the method I described, create 4 SETS of triggers
make 2 sets wide, 2 sets tall
SURROUND the mission area you want them to stay in
as long as they stay BETWEEN THE TRIGGERS they are perfectly safe
the editor will look like this:
----------------------------
            trig
-----------------------------
|-|                             |-|
|t|                             |t|
|r|    mission area     |r|
|i|                              |i|
|g|                             |g|
|_|                             |-|
------------------------------
    trig
------------------------------

does this clear it up?  no scripting required

gundernak

  • Guest
Re:Killzone
« Reply #6 on: 12 Jan 2004, 15:35:31 »
any opinion about my post?

I would like to add one thing. Type this to the 'on deactivation' field of the trigger grouped with the dude:

dudeLeftBorder = false

and set this trigger repeatedly

And I guess this is you want.

you will get a warning and if you go towards at a point (I wrote distence 200) you will be killed.

Obviuosly the distance must be higher than the radius of the trigger.

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Killzone
« Reply #7 on: 13 Jan 2004, 00:39:06 »
@Zombie

look Zombie, i really do not want to downgrade your efforts
in trying to help here, but your solution is far far from being
efficient.

First i should say: i was using exactly the same technique, you
are talking about, in my very first multiplayer map two and a
half year ago.

So did also some other ppl at that time, but very soon we figured out that it's a very unstable method.

There are many problems when using it.

1) rectangle triggers + multiplayer maps

For some strange reason, rectangle triggers do not work
correctly in multiplayer.
rigger effects or commands from the onActivation field appear, even if nobody has ever entered the trigger area.

2) 4 triggers, covering a specified area, do cause a lot of lag
in multiplayer. You may answer now: two triggers doin' that
too, but at least two triggers are half as much as four  ;)

3) Repeating triggers require to become inactive, before they
are able to get reactivated. In this case it means that:
there must not be any unit inside the trigger area, before
the trigger gets inactive.

Now try the following: (*hint* you can do that even in single
player)

create a group of soldiers, and make yourself to be the group's
leader - use a formation, where some of your men are walking
in front of you (V-formation) - now enter the trigger with the
whole group, and you'll see that not the entire group gets killed

Now tell one of the living guys to wait there, and voilla: the
trigger is broken - you can enter and leave the trigger area
as often as you want, and nothing happens anymore

To avoid this bug you would need to create at least 3 triggers
of the same kind for each of the 4 triggers.

Will look like this:
                         ------------------------------
                                          trig
                           ------------------------------
                         
 
                         ------------------------------
                                          trig
                          ------------------------------

                          ----------------------------
                                         trig
                          -----------------------------
                  |-| |-| |-|                          |-||-||-|
                  |-| |-||t|                            |t||-| |-|
                  |-| |-||r|    mission area    |r||-| |-|
                  |-| |-||i|                             |i||-| |-|
                  |-| |-||g|                           |g||-| |-|
                  |-| |-||_|                            |-||-| |-|
                           ------------------------------
                                          trig
                           ------------------------------

                           ------------------------------
                                          trig
                           ------------------------------

                           ------------------------------
                                          trig
                           ------------------------------

Off course these triggers shouldn't be placed one beside
another, more you would place them some kind'a overlapping
way.

That way you could ensure that almost everybody who leaves
the inner area, gets killed (still not for 100% as it still can happen that somebody survives inside)

Now there are 12 triggers = warping/jumping due to unnecessary lag, caused by heavy network traffic.

4) multiplayer + side present/not present triggers do not
work perfectly, because of some objects being local there
and others being local somewhere else.

:note - it may happen that such a side/present trigger does
what you want this time, but it will also happen that it doesn't
the next time

-

and you can trust me on that, as i was doing way more
testing in ofp multiplayer editing, than even making missions
(caused by trying to recreate problems, ppl brought up on
the forums)   :D

Quote
does this clear it up?  no scripting required

"_x setdammage 1" forEach thislist
looks to me like script commands, so my answer is:

no it doesn't clear it up - the only difference is that i was
using the: killlist = list triggerB - list triggerA


@gundernak:

Quote
any opinion about my post?

off course, Zombie already mentioned one point in his first
post (i agree to him on this one)

And here is mine:

your way is a little step into the right direction, but it won't
work in multiplayer, as you would have to do that for each
unit seperately, due to the problem of triggers not becoming
inactive, as long as the trigger conditions do still match
In your case: nobody gets killed for leaving the trigger area,
as long as still somebody else is inside the trigger area.

Also you would have to do changes to your method, so that
the result would be: you would end up doing it very similar
to the method, i suggested.

Ah yes, the method i suggested:

this method does not come from me myself, it was used by
BIS in any of their maps, where they were using such limited
zones.

Just use the editing wizard to create a flagfight map, and if
you gonna have a look on it in the editor, you'll see.

What the method does basically is:

it instantly kills the soldiers, who are inside the outer trigger,
but not inside the inner trigger


@EgWal:

If you need more info on how to do the part, which i explained
at the end of my suggestion (instant update by script or trigger), just le'mme know  ;)

Oh yes, the warning:

surely the warning message can be implemented using the
same method (again by script or trigger - how ya want),
or by even making a third trigger, not as big as the outer
trigger, but bigger than the inner one.

P.S: i do not want to earn any medals here, just trying to
show you the problems, you will run in for sure.

Feel free to use whatever method you want, but never forget
to test all possible events, which can happen during a game,
where others are playing (not thinking the same way, as
the mission maker did during the creation of the mission).

hope this helps

~S~ CD
« Last Edit: 13 Jan 2004, 00:44:05 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

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Killzone
« Reply #8 on: 13 Jan 2004, 03:33:54 »
Chris,

1)   I knew there was a problem with trigger areas in MP, I didn't know it was rectangular ones.   What will they think of next?

2)  Too many triggers is indeed a baaaaaad thing.

3)   I had that very problem with trigger areas some time ago.    You would need at least three layers of triggers to make it work.   I know two isn't enough, I tried it before giving up and looking for a better solution.
Plenty of reviewed ArmA missions for you to play

Offline Zombie

  • Members
  • *
  • Beware the night, the zombie walks among you
    • USI
Re:Killzone
« Reply #9 on: 13 Jan 2004, 04:32:59 »
Chris,
 Sorry if I came across as sensitive or something, that wasn't the idea.  I have never noticed the problem you mentioned in any game, but when I tried the test mission you suggested, I was able to reproduce the effects you described.
  I have seen other peoples work with the inner and outer triggers and didn't get what they were doing, but now it makes sense.  Even this old dog can learn new stuff!
  The only problem I ever noticed with rectangular triggers is trying to "mate them up", which as we all know is tough, but I just started to overlap the horizontal and vertical triggers a little bit and no holes were left.
  It was my impression the game logic server solved the local issue you brought up, but I admit that could be flawed.  Always looking to learn new tricks, and efficiency is always good, so don't be afraid to shine the light of truth on me!  
BTW, I know there is a way to titletext the name of the offender before he crosses to the kill zone, but my caffiene deprived brain can't recall the details right now.
  Thanks for the tips tho!

Egwal

  • Guest
Re:Killzone
« Reply #10 on: 19 Jan 2004, 18:38:35 »
Still another question concerning the "killzone". How can I set a different zone for different players? Preferebly by RECTANGLE triggers.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:Killzone
« Reply #11 on: 19 Jan 2004, 18:50:07 »
Rectangular triggers don't work in MP, so I'm told.

If you want a trigger to be specific to a group, then group the trigger to the group leader and you'll get new options in the Activation Box.

Alternatively, make it say West present and

Condition:   loon1 in thislist

Syntax not guaranteed, but that's the principle.
Plenty of reviewed ArmA missions for you to play

Egwal

  • Guest
Re:Killzone
« Reply #12 on: 23 Jan 2004, 21:47:23 »
More coming!
1. Ive got multiple triggers, and I would like the mission end when a certain unit is present at any1 of them. How?
2. Now Ive got the Area trigger, which activates when a certain unit is not present and says: hint blablabla. When the unit is killed (not (alive upseeri)), Id like the Area trigger to deactivate/destroy/delete itself so when no unit present it wont post the hint.

gundernak

  • Guest
Re:Killzone
« Reply #13 on: 23 Jan 2004, 22:06:19 »
 1:

group the certain unit to each triggers - he will activate the triggers


2:

put this into init.sqs:

HintNotShowed = true


add this to the trigger 'condition' field:

and HintNotShowed


add this to 'on activation' field:

HintNotShowed = false


I defined now a variable (in init.sqs)

the trigger will activate only if this is true

when trigger is activated the variable becomes false and not let the trigger activated again...