Home   Help Search Login Register  

Author Topic: warning at outside border  (Read 2272 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
warning at outside border
« on: 25 May 2003, 23:04:46 »
I have a killzone in a CTF mission but I want a warning before the player is outside the border.

There are :

- a trigger that covers the whole map (outer border)
- a trigger that covers the inner border
- a trigger a bit smaller than the inner border, when the player is outside it, I want to show him (or everybody) a warning via a hint or titletext...

When the player is  outside the inner border he will lose health -0.1 repeatedly, I'v used the triggers from the official paintball.abel mission, it works but...

How can I check if there's somebody in the area between warningborder and the innerborder?

Do I need a trigger for each side?

please HELP


« Last Edit: 25 May 2003, 23:10:33 by Blanco »
Search or search or search before you ask.

Offline macguba

  • Former Staff
  • ****
    • macguba's operation flashpoint page
Re:warning at outside border
« Reply #1 on: 25 May 2003, 23:09:06 »
Can't you just show a warning hint if the player is not present in the inner area?

If you want him to lose health you have to add dammage 0.1, not -0.1.
Plenty of reviewed ArmA missions for you to play

Offline Blanco

  • Former Staff
  • ****
Re:warning at inner border
« Reply #2 on: 25 May 2003, 23:17:17 »
wow, fast reply!

Yes I know about the dammage, that works great, I was wrong in my explanation... :-\

When he's outside the inner border it's already to late...en how can I do that cos not present east or west is not possible,..  :-\

Player works in MP?



 
« Last Edit: 25 May 2003, 23:21:55 by Blanco »
Search or search or search before you ask.

Offline Wolfrug

  • Addons Depot
  • Former Staff
  • ****
  • Official OFPEC Old Timer
Re:warning at outside border
« Reply #3 on: 25 May 2003, 23:23:17 »
Add damage command...? Whazzat?  :o

If there is such a thing, forgive me. But back in the day, we'd make a lil' script as such:

#loop
?!alive _unit : exit
_unit setdammage (getdammage _unit + 0.1)
~5
? _unit in list _triggerName : goto "loop"

exit

this would (untested) make the _unit loose 10 percentile units of health every 5 seconds as long as he's in the trigger radius of _triggerName (and alive ;)).

problems: only works for one unit, I have no idea how to make this work for everyone in a CTF map (why I moved it to this forum). Anyhow. Just make sure the trigger is named properly and that the "activated by" is for anything.

g'luck. :thumbsup:

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

Offline Blanco

  • Former Staff
  • ****
Re:warning at outside border
« Reply #4 on: 30 May 2003, 19:29:22 »
thx, but that's not what I need...  :)

I need a warningzone INSIDE the innerzone, ...The player got punished when he try to leave the innerzone and the name of the tresspasser should be displayed in a hint or tittletext. Now I've used a lot of ovalshaped triggers to do the same, it works, but there must be a better way to do it...

I don't need a warningzone OUTSIDE the innerzone, like the west or east safezones at the spawnplaces, like the solutions I found here in the forum...

I hope this explains the problem cos it isn't easy in english for me... :-\

 
Search or search or search before you ask.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:warning at outside border
« Reply #5 on: 30 May 2003, 20:32:42 »
if i get this right, you want to do something if
1) Player is not in the inner area trigger you named "Innerborder"
but
2) Is in the wider "Warningborder"



Create a looping script, have it started by the init.sqs

#start
~0.5
?!(vehicle player in list warningborder) && (vehicle player inlist innerborder"):goto "Showmessage"
goto "start"

#showmessage
?(local player):titleText[format["%1\nYou left a secure zone ",name (player],"Plain down"]
#punish
~1
?(vehicle player inlist innerborder"):exit
?(local player) setdammage (getdammage player + 0.1)

?(local player)!alive player : exit
_unit setdammage (getdammage _unit + 0.1)
;;do whatever you want in here
:goto "Punish"


This will damage a player by 0.1 every 1 second while he is not in the Innerborder



maybe  some syntax probs here
syntax might require tweaking


Alternatively you could have the inner trigger do something on deactivation, or have the warning trigger do something on activation

Warning trigger would be something like this

Activated by anybody/repeating
Condition:vehicle player inlist innerborder
On activation: if (Player in thisList) then { Titletext[format["%1 \n You have left a Safezone \nHead back or die!",name(thisList select 0)],"Plain down"]}

maybe you could use the countdown factor to give the player time to get back to the inner zone before you setdammage 1, or you could simply run na script that loops and gives damage 0.1 every rotation until he returns to the inner sanctum of safety
« Last Edit: 30 May 2003, 20:48:15 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Blanco

  • Former Staff
  • ****
Re:warning at outside border
« Reply #6 on: 30 May 2003, 22:25:57 »
if i get this right, you want to do something if
1) Player is not in the inner area trigger you named "Innerborder"
but
2) Is in the wider "Warningborder"
...

Hmm no, the warningborder is smaller than the innerborder, the player need the warning before he leave the zone.

When the Innerborder is a circleshaped trigger
axis a=1000
axis b = 1000

and the warningborder  
axis a = 800
axis b = 800
also a circleshaped trigger...

How can I check if there someone in the warningborder cos when he's in the warningborder he's in the innerborder too...

I would be easier if I could explain it with a drawing... :)





« Last Edit: 30 May 2003, 22:26:35 by Blanco »
Search or search or search before you ask.

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:warning at outside border
« Reply #7 on: 31 May 2003, 13:25:47 »
use the same system as above just improvise.

Basically if he isnt in the inner circle, but is in the outer circle then print a text message. If he then leaves that outer circle to the kill zone area, then setdammage to him. You have all the info above to make thos happen

You basically script into the condition field of each trigger

if player is inlist outer circle and not in inner circle, then activate a titletext message

If player is in list killzone but not in list inner or outer circle then setdammage


the activation field of the outer circle and the killzone needs to activate a script

These scripts need to loop, on every loop they need to question where the player is and do whatever action is required.

If the player is not in the required triggers  then you exit the script

If the player is dead then you exit the script.
« Last Edit: 31 May 2003, 13:29:43 by Terox »
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:warning at outside border
« Reply #8 on: 01 Jun 2003, 04:48:35 »
Forgive my ignorance (I've got no way of testing this MP wise), but how about just using two triggers and dropping the script?

Init.sqs or any units init field

Playerout = false

Inner Trigger

Radius: As Required
Condition: Anybody Present (Repeatedly)
Condition Field: not (vehicle player in thislist)
OnActivation: Hint "You are leaving the game area. Turn around now Etc."
OnDeactivation: Hint "Stay in the area from now on, fool!"

Outer Trigger

Radius: As required - bigger than inner obviously
Condition: Anybody Present (Repeatedly)
Timeout: Min 5  Mid 5  Max 5
Condition Field: not (vehicle player in thislist) and not playerout
OnActivation: player setdammage (getdamage player + 0.1); Hint "Ouch!"; playerout = true
OnDeactivation: playerout = false

Now because the variable Playerout is never made public, it acts as a kind of 'client side' variable. It's only every activated using those triggers (which are client specific, due to the use of the player command). ?? Yes?

Anyway, that works in single player... not sure how it will go MP though ;)