Home   Help Search Login Register  

Author Topic: !alive player with publicvariable?  (Read 1405 times)

0 Members and 3 Guests are viewing this topic.

GingaWRATH

  • Guest
!alive player with publicvariable?
« on: 09 Jul 2005, 14:37:46 »

I have this trigger

Con: !alive player
onact: [] exec "script.sqs"


this triggers is Local, and I have publicvariables in the .sqs

and want the sqs to run on all machines but need to use this condition.

is there anyway of making !alive player Or a Trigger Public.

GingaWRATH

  • Guest
Re:!alive player with publicvariable?
« Reply #1 on: 09 Jul 2005, 14:49:58 »
Basically I want All clients on the server to see any msgs.

Im using Globalchat for my msgs but only the Player who died sees anything.
« Last Edit: 09 Jul 2005, 14:50:11 by GingaWRATH »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:!alive player with publicvariable?
« Reply #2 on: 09 Jul 2005, 14:58:12 »
1) attach a killed eventhandler to the Players
2) When killed have the eventhandler make a boolean true and publicvariable it
3) Have a trigger waiting on that boolean to become true
4) Have the activation field of the trigger run a script
5) For repeating purposes, have the trigger script reset the boolean to false

eg


INIT.SQS
Quote
tx_dead = false
player addEventHandler ["killed", {tx_dead = true; Publicvariable "tx_dead"}]

TRIGGER
Quote
Activated by: Nobody
Set To: Repeatedly
Condition: tx_dead
On activation: [] exec "Alive.sqs"

Alive.sqs
Quote
tx_dead = false
add your own lines of code here
exit
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

GingaWRATH

  • Guest
Re:!alive player with publicvariable?
« Reply #3 on: 09 Jul 2005, 15:21:33 »
Brilliant Worx great Thanx Now I can goto sleep.. ;D