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 / Can this script become a working diving-script???

Author
Message
Mr Love
12
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 21st Oct 2017 20:22
The problem is that it isnt showing any numbers for how mutch air its left. Is it possible to fix this with not a big change of the script?
Here is the script:


Attachments

Login to view attachments
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Oct 2017 13:51 Edited at: 22nd Oct 2017 16:18
Mr Love Is this script suppose to show a hud for "air left"
ONLY when the player is underwater, correct?
Your hud is working correctly, but it will only show "02" using "hudmake=display"
This is an "internal" variable ?? correct ?
Also the "Setairtime=x" is in milliseconds, so 100 is 1/10 of a second. Kinda fast.
I've never used these commands, let me play a bit and see...

Edit: Mr Love.... yeah as I suspected, the air system must use a etimer together with
the "air" commands. No biggie, it's just a matter of what your trying to achieve ?
You got the hud showing, now you need to set an "air" variable (global or local)
and use the timer to count down.
So what is it you want to happen when the player enters the water ?
My games never have bugs. They just develop random features..
Lots and lots of random features...
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 22nd Oct 2017 23:27
Mr Love Ok, after a little playing with these commands I realized I was wrong before.
An etimer for these are not needed. Here is a basic "Air-Left" underwater script.
Attach to a trigger, make a simple room with water that the player can get in and out of easily.
Add things to it you want, like the FOV. You can also turn this into a "bar-graph" instead of numbers ???
You'll want to see how the script changes.

Note: make sure you have a folder under files named "databank" it has the needed air
files and others like radar, armor..ect
My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
12
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 23rd Oct 2017 01:17 Edited at: 23rd Oct 2017 06:04
The scary thinker had exactly the solution I wanted!!! But I need help with two things here, first its irritating that the numerics shows when Im on land.. And I want to remove the hud when on land, and show it in the water....
I also wonder why this hud is not showing at all: :state=0:hudreset,hudx=25,hudy=5,hudimage=languagebank\english\gamecore\huds\air.dds,hudtype=1,hudmake=display
And I cant even move the number "numerics" to My new hudimage (That shourld remove when not diving)


Attachments

Login to view attachments
ncmako
6
Years of Service
User Offline
Joined: 19th Feb 2012
Location: Hendersonville,NC
Posted: 24th Oct 2017 00:07
Mr Love
Quote: "I also wonder why this hud is not showing at all"

First, do you have this image in the correct folder? Double check that.
Try giving it a name and test? But this is for the "image" air.dds,
and the "numeric" for "breathing" is where the script says it to be (hudx=24,hudy=8) that fits to the picture you posted.
Your arrow's location is at about hudx=10 or 12 and the hudy=80-85 I'm guessing?

You should try/test the script I posted, it does the same thing.


My games never have bugs. They just develop random features..
Lots and lots of random features...
Mr Love
12
Years of Service
User Offline
Joined: 9th Jun 2005
Playing: MAFIA 2
Posted: 24th Oct 2017 03:42
Thanks alot ncmako! Now I have a watersystem that works well I think...

Login to post a reply

Server time is: 2018-05-27 10:52:19
Your offset time is: 2018-05-27 10:52:19