Posted: 15th Oct 2005 04:37
Ooops, here is said working script which didn't appear to upload the first time round, I will take Monsters advise and copy it into the post (at the risk of flames from others!).
Although this worked in author mode when actually compiled and tested in a 5 person network the -health damaged the hostplayer only and not the joiners who may have activated the script in their wanderings within the arena. so here is my next question....
Is there a difference between 'anywithin' and 'plrdistwithin' when it comes to hosting a game? As it only seems to damage the host player which doesn't seem fair!!
;Artificial Intelligence Script
; 0-once face player
; 1-once keep angle
; 2-loop face player
; 3-loop keep angle
; 4-once face up
; 5-loop face up
; 6-character-spot-decal (at end of entity characters gun if available)
;Header
desc = Runs Decal Loop
;Activates Decal (FIRE) and then makes invisible, makes Visible when player is within a certain proximity
;=================================================================
:state=0:rundecal=-1,state=1
:state=1,anywithin=200:rundecal=2,state=3
;Initiates Timer
;=================================================================
:state=3:state=4,timerstart
;If player is too close to Decal (FIRE) player starts to FRY!!
;=================================================================
:state=13,anywithin=65:plraddhealth=-1
:state=60,anywithin=45:plraddhealth=-1
;FIRE FIRE FIRE PIPE. Sound and Visual alert
;=================================================================
:state=4:sound=audiobank\EN\firefirefirePAINTSHOP.wav
:state=4:loopsound=audiobank\atmos\firehum.wav
:state=4:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\text\firefirefirePAINTSTORE.tga,hudname=ammoprompt12,hudhide=1,hudmake=display,state=20
:state=20:hudshow=ammoprompt12,state=21
:state=21,timergreater=1000:timerstart,state=22
;Sets length of time for FIRE WARNING visual message FADE
;=================================================================
:state=22,timergreater=6000:hudfadeout=ammoprompt12,state=23
;IF player makes it to fire within 2 minutes then FIRE goes out and SOUND and VISUAL GOOD feedback
;=================================================================
:state=23,anywithin=65:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\text\firefirefireINTIME.tga,hudname=ammoprompt13,hudhide=1,hudmake=display,state=25
:state=25:sound=audiobank\EN\firefirefireWELLDONE.wav
:state=25:hudshow=ammoprompt13,state=50
:state=50:state=30,timerstart
:state=30,timergreater=4500:hudfadeout=ammoprompt13,state=60
:state=60,timergreater=8000:plraddhealth=-1,state=31
:state=31:sound=audiobank\smash\concrete.wav,rundecal=0,state=32
:state=32,alphafadeequal=100:decalphafade=0
:state=32,alphafadeequal=0:state=33
:state=33:state=34,destroy
;IF player has taken longer than 2 minutes then player DIES and BAAD message appears.
;=================================================================
:state=23,timergreater=90000:sound=audiobank\misc\steam.wav,sound=audiobank\EN\firefirefireYOUDIE.wav,state=6
:state=6:hudreset,hudx=50,hudy=50,hudimagefine=gamecore\text\firefirefireTOOLONG.tga,hudname=ammoprompt14,hudhide=1,hudmake=display,state=7
:state=7:hudshow=ammoprompt14,state=8
:state=8,timergreater=1000:timerstart,state=9
:state=9,timergreater=4000:hudfadeout=ammoprompt14,sound=audiobank\voices\male\finalmoan.wav,state=12
:state=12:plraddhealth=-100,state=100
;End of Script