Home   Help Search Login Register  

Author Topic: Only flyzone trigger ??  (Read 527 times)

0 Members and 1 Guest are viewing this topic.

TiLLoN

  • Guest
Only flyzone trigger ??
« on: 27 Apr 2003, 02:02:54 »
I am making a MP map, where i need a trigger or something to make a zone where it is punishable by death not to be flying.

I have be trying to script something but i am a bloody n00b, so plz .... can anyone tell me how to make a fly only area ??

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Only flyzone trigger ??
« Reply #1 on: 27 Apr 2003, 02:47:12 »
 :o well, a repeated trigger covering the map might be worth a try :

som'n like this condition:

"getpos _x select 2 <18" foreach ThisList


...and then.... the always "annoy @ Tomb" problem: picking out those _x men  ::) >:( ;D


sorry lazzy, I still haven't found out how 2 create one-man arrays outta _x'es  :(

guess ya need to define each player in the first place  :-\




Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Only flyzone trigger ??
« Reply #2 on: 27 Apr 2003, 02:48:31 »
Try something like this:

Init.sqs or any units init field

noflytrig = 0

Trigger

Radius: as required
Condition: Anybody Present (repeatedly)
Condition field: count thislist != noflytrig
OnActivation field: "if (getpos _x select 2 < 2) then {_x setdammage 1}" foreach thislist; noflytrig = count thislist

See if that suits your purposes ;)

[size=0.5]Edit: Oops, that's better. There are circumstances where my first answer wouldn't have worked ;)[/size]
« Last Edit: 27 Apr 2003, 03:11:50 by Sui »

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Only flyzone trigger ??
« Reply #3 on: 27 Apr 2003, 02:52:42 »








                                                    :wow:















TiLLoN

  • Guest
Re:Only flyzone trigger ??
« Reply #4 on: 27 Apr 2003, 10:41:11 »
Thanks Sui your where right.
But I had to make a little adjustment, just for the record here is what I did:

In the Init.sqs i added : noflytrig = 0

The trigger (nearly like Sui's):
Radius: as required
Condition: Anybody Present (repeatedly)
Condition field: count thislist != noflytrig
OnActivation field:"if (getpos player select 2 < 2) then {player setdammage 1}" foreach thislist; noflytrig = count thislist  

TiLLoN

  • Guest
Re:Only flyzone trigger ??
« Reply #5 on: 27 Apr 2003, 11:40:31 »
Damn sorry. I was too quick there. The script is NOT working properly. :'(
If a person parachute out over the Fly only zone, the script will not kill him.  :-[
Anyone have a solution to this problem?

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Only flyzone trigger ??
« Reply #6 on: 27 Apr 2003, 12:11:09 »
well, you'll have to include summit like :


Vehicle Player != Player


in the conditions. So if player bails, veh. player will be == player,
and thus the conditions are not met anymore!


Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Only flyzone trigger ??
« Reply #7 on: 28 Apr 2003, 02:41:10 »
Geez... you'd be difficult wouldn't you?

You want it to kill parachutist's too do you?

Nah, only joking mate ;D

You're right, the trigger before isn't suitable for that... it will only activate if the number of units in the trigger radius changes (which it doesn't if someone parachutes in).

So, try it with the following modifications:

Trigger

Radius: as required
Condition: Anybody Present (repeatedly)
Countdown -  Min: 5    Mid: 5    Max: 5
Condition field: count thislist != noflytrig
OnActivation field: "if (getpos _x select 2 < 2) then {_x setdammage 1}" foreach thislist; noflytrig = count thislist
OnDeactivation field: noflytrig = 0

That will also activate based on time (5 second intervals) if there are any units in the trigger radius.
Hence, it will be going off every five seconds, so when your parachutist hits the ground, they will have five seconds (if they're lucky) before the trigger gets them ;)