Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / HELP: If then statements in MP with decals

Author
Message
EVo
19
Years of Service
User Offline
Joined: 12th Oct 2005
Location:
Posted: 12th Oct 2005 10:39
Does anyone have any ideas on how to implement an if/then scenario with decals cleverly in MP mode?
EVo
19
Years of Service
User Offline
Joined: 12th Oct 2005
Location:
Posted: 12th Oct 2005 12:46
Have added my script.



nb:
\\I have commented out the if/then scenario. because it doesn't work with it.

\\:state=11,plrdistwithin=45:plraddhealth=-1 needs to run after HUDshow or else it will not work.

\\distances and times are not accurate for purpose of testing only.

Attachments

Login to view attachments
Evil stick
19
Years of Service
User Offline
Joined: 27th Mar 2005
Location:
Posted: 12th Oct 2005 14:00
What? Are you talking about a script? If so, you use the state variable.

I ALWAYS have flame proof jacket...just in case...and a shotgun. If you want any, just ask!

We are all nice,except for that one who's name starts in a m and ends in erranvo.
EVo
19
Years of Service
User Offline
Joined: 12th Oct 2005
Location:
Posted: 13th Oct 2005 07:42
yippeee, this works good enough for my purposes.
I have managed to attach this to 5 separate fire decals with different sound files and targa files warning where the individual fires are. Now if only I could destroy the fires with a weapon in MP.

ps: to have more than 1 fire change where it says (hudname=ammopromptX) where X is for different HUD Targas to avoid HUD glitches.

Happy for anyone to refine this script...
eg: Destroy the fires with a weapon in MP. (creatively and without saying it can't be done!)
Merranvo
19
Years of Service
User Offline
Joined: 24th May 2005
Location: That ^ is a Orange
Posted: 14th Oct 2005 02:31
it can't be done. Sorry, You never posted your source. and don't say it is in the source box, have you checked the source box?

Do what I do, MONSTERTIZE IT! and post it in your message. If you really want to, you can code box it (but dont).

"ye oft de adopte early shalt move mountains, and be gods among men"

He who knows everything knows nothing at all.
EVo
19
Years of Service
User Offline
Joined: 12th Oct 2005
Location:
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

Login to post a reply

Server time is: 2024-11-23 12:26:48
Your offset time is: 2024-11-23 12:26:48