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 / A realistic Air System

Author
Message
zenix
14
Years of Service
User Offline
Joined: 27th May 2010
Location: Somewhere out there
Posted: 28th Aug 2012 06:19
Hi guys, I was thinking that we can do a very realistic Air System based in this two scripts:
The first one is to modify this script of Water Revolution (http://forum.thegamecreators.com/?m=forum_view&t=150826&b=23) so the player´s health decrease to 10 after 50 seconds and from there his life decrease to 10 every second, that´s would be more realistic. And if it´s possible, to make an oxygen sistem, so the player can pick up tubes to recover air (That would be with some modification of this script created by tax78: http://forum.thegamecreators.com/?m=forum_view&t=199271&b=23)}
So, what do you think? It´s a great idea!
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 28th Aug 2012 08:59
Given the fact that the player usually can take a couple of bullets without immideately dying or at least passing out, I think it's not 'too' unrealistic that he can hold his breath a tad longer than we can in RL.

But everyone should modify the game to his liking, so go ahead

In case you find my grammar and spelling weird ---> native German speaker ^^
zenix
14
Years of Service
User Offline
Joined: 27th May 2010
Location: Somewhere out there
Posted: 29th Aug 2012 01:02
Yes, I´ve been trying to modify this Script

;Artificial Intelligence Script

;Header

desc = water

;Triggers

:always:globalvar=90

:state=0:hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0001.png,hudname=frame1,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0016.png,hudname=frame16,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0015.png,hudname=frame15,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0014.png,hudname=frame14,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0013.png,hudname=frame13,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0012.png,hudname=frame12,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0011.png,hudname=frame11,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0010.png,hudname=frame10,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0009.png,hudname=frame9,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0008.png,hudname=frame8,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0007.png,hudname=frame7,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0006.png,hudname=frame6,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0005.png,hudname=frame5,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0004.png,hudname=frame4,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0003.png,hudname=frame3,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/frame0002.png,hudname=frame2,hudhide=1,hudmake=display,hudreset,hudx=50,hudy=50,hudsizex=1024,hudsizey=768,hudimage=gamecore/huds/Underwater/waterfall.png,hudname=waterfall,hudhide=1,hudmake=display
:state=0,plrwithinzone=1:setvar=1,hudunshow=waterfall,hudreset,hudx=50,hudy=50,hudimagefine=gamecore/huds/Underwater/water.dds,hudname=water,hudshow=water,hudmake=display,fogred=1,fogblue=250,foggreen=100,ambience=30,ambiencered=0,ambienceblue=250,ambiencegreen=100,timerstart,newjumpheight=100,state=1
:state=0,plrwithinzone=0:setvar=2,hudunshow=water,newjumpheight=50,fog=0,ambience=30,ambiencered=30,ambienceblue=30,ambiencegreen=30,hudunshow=frame1,hudunshow=frame2,hudunshow=frame3,hudunshow=frame4,hudunshow=frame5,hudunshow=frame6,hudunshow=frame7,hudunshow=frame8,hudunshow=frame9,hudunshow=frame10,hudunshow=frame11,hudunshow=frame12,hudunshow=frame13,hudunshow=frame14,hudunshow=frame15,hudunshow=frame16
:state=1:state=2

:state=2,timergreater=10000,plrwithinzone=1:plraddhealth=-10,hudshow=frame1,state=3
:state=2,plrwithinzone=0:state=0
:state=3,timergreater=10100,plrwithinzone=1:hudshow=frame2,hudunshow=frame1,state=4
:state=3,plrwithinzone=0:state=0
:state=4,timergreater=10200,plrwithinzone=1:hudshow=frame3,hudunshow=frame2,state=5
:state=4,plrwithinzone=0:state=0
:state=5,timergreater=10300,plrwithinzone=1:hudshow=frame4,hudunshow=frame3,state=6
:state=5,plrwithinzone=0:state=0
:state=6,timergreater=10400,plrwithinzone=1:hudshow=frame5,hudunshow=frame4,state=7
:state=6,plrwithinzone=0:state=0
:state=7,timergreater=10500,plrwithinzone=1:hudshow=frame6,hudunshow=frame5,state=8
:state=7,plrwithinzone=0:state=0
:state=8,timergreater=10600,plrwithinzone=1:hudshow=frame7,hudunshow=frame6,state=9
:state=8,plrwithinzone=0:state=0
:state=9,timergreater=10700,plrwithinzone=1:hudshow=frame8,hudunshow=frame7,state=10
:state=9,plrwithinzone=0:state=0
:state=10,timergreater=10800,plrwithinzone=1:hudshow=frame9,hudunshow=frame8,state=11
:state=10,plrwithinzone=0:state=0
:state=11,timergreater=10900,plrwithinzone=1:hudshow=frame10,hudunshow=frame9,state=12
:state=11,plrwithinzone=0:state=0
:state=12,timergreater=11000,plrwithinzone=1:hudshow=frame11,hudunshow=frame10,state=13
:state=12,plrwithinzone=0:state=0
:state=13,timergreater=11100,plrwithinzone=1:hudshow=frame12,hudunshow=frame11,state=14
:state=13,plrwithinzone=0:state=0
:state=14,timergreater=11200,plrwithinzone=1:hudshow=frame13,hudunshow=frame12,state=15
:state=14,plrwithinzone=0:state=0
:state=15,timergreater=11300,plrwithinzone=1:hudshow=frame14,hudunshow=frame13,state=16
:state=15,plrwithinzone=0:state=0
:state=16,timergreater=11400,plrwithinzone=1:hudshow=frame15,hudunshow=frame14,state=17
:state=16,plrwithinzone=0:state=0
:state=17,timergreater=11500,plrwithinzone=1:hudshow=frame16,hudunshow=frame15,state=18
:state=17,plrwithinzone=0:state=0
:state=18,timergreater=11600,plrwithinzone=1:hudfadeout=frame16,state=0
:plrwithinzone=0,varequal=1:hudshow=waterfall,hudunshow=water,hudunshow=water,newjumpheight=50,fog=0,ambience=30,ambiencered=30,ambienceblue=30,ambiencegreen=30,hudunshow=frame1,hudunshow=frame2,hudunshow=frame3,hudunshow=frame4,hudunshow=frame5,hudunshow=frame6,hudunshow=frame7,hudunshow=frame8,hudunshow=frame9,hudunshow=frame10,hudunshow=frame11,hudunshow=frame12,hudunshow=frame13,hudunshow=frame14,hudunshow=frame15,hudunshow=frame16,state=21

:state=21,plrwithinzone=0,scancodekeypressed=15,varequal=1:hudunshow=waterfall,state=0
:state=21,plrwithinzone=1:state=0
:anywithinzone=1:activateallinzone=1


So when the player is more than a minute under water his life decrease by 10, and from there, every second his life decrease by 10 again.
But I can´t make it work, the player always lose health every 10 seconds. Where it says "timergreater=10000" I tried putting "timergreater=60000" and from there "timergreater=1000...
Can anyone help me, What I am doing wrong?
The Storyteller 01
15
Years of Service
User Offline
Joined: 11th May 2009
Location: On a silent hill in dead space
Posted: 29th Aug 2012 11:20 Edited at: 29th Aug 2012 11:21
The original script runs too fast because 1000 = 1 second

But starting with 60000 should have worked.

In case you find my grammar and spelling weird ---> native German speaker ^^
zenix
14
Years of Service
User Offline
Joined: 27th May 2010
Location: Somewhere out there
Posted: 29th Aug 2012 17:49
Yes, what I did was modify this lines



And put something like this:



And that´s what I made with all of them, in the first one I just change the original time to 60000 (1 Minute) and from there I only put 1000,2000,3000,etc... So the player´s health decrease by 10 when passed the minute under water and from there his life decrease by ten every second (That why I put 1000= 1 Second, 2000= 2 seconds, 3000=3 Seconds,etc...)
But the player always lose health every 10 seconds, and really I don´t know what I am doing wrong.
There are more scripts of the Water Revolution, but this is the one that makes the player lose health...
zenix
14
Years of Service
User Offline
Joined: 27th May 2010
Location: Somewhere out there
Posted: 31st Aug 2012 03:23
I get it work!!!! If I finish the script of the oxygen I will post the Scripts!

Login to post a reply

Server time is: 2024-11-23 22:51:23
Your offset time is: 2024-11-23 22:51:23