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 / HUD positions without editing setup.ini

Author
Message
Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 21st May 2009 16:11 Edited at: 22nd May 2009 12:25
Hi guys.

Quite a while ago I created a script for a custom HUD and with the help of CE implemented it properly into FPSC. I've recently come back to this now to find that for some reason the position of the ammo HUD is not correct. I've tried various different codes to try to fix this but whenever I test it, the ammo HUD is in the position stated in the setup.ini and not in my HUD script. How can I get FPSC to follow coordinates set in my HUD script rather than in the setup.ini?

The script is added to a dynamic entity like a decal and set to always active.

(Top line was my attempt to get the ammo HUD working, it failed.)




Another thing I would like to do is hide the weapon HUD which appears whenever you select a weapon without having to actually delete them. How can I go about this?

The last thing I'd like to do is hide the ammo HUD when we get into that <26 health state. Obviously I haven't been able to try this one as I can't get the ammo HUD to follow the script.

Help with any of these things would be great. I'm not much of a scripter but I'm slowly learning. Any little coding snippets or advice you can give me will really help me on my way!
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd May 2009 00:49
I believe that if you attempt to make the same HUD twice, it will fail. Try removing the ammo HUD setup from the setuplevel.fpi (Or just CHANGE it)


The one and only,


Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 22nd May 2009 06:58 Edited at: 22nd May 2009 07:02
Quote: "I believe that if you attempt to make the same HUD twice, it will fail. Try removing the ammo HUD setup from the setuplevel.fpi (Or just CHANGE it)"


...yeppers. The SETUPLEVEL.fpi runs before any of the gameplay scripts, and most certainly takes precedence over other script, due to this fact.

An edit to the SETUPLEVEL.fpi, in some fashion, is going to be a mandatory task if you want the effect you're after...

Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 22nd May 2009 12:24 Edited at: 22nd May 2009 12:24
Ok, so I will have to mess about with the setup.ini afterall. Thanks!

So if I wanted to hide the ammo HUD when my health was below 26, would it be a good idea/bad idea to code it directly into the setup.ini? Or is that infact the only way I could do it?
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 22nd May 2009 21:40
Here's what I do:
- Edit the setuplevel.fpi script (NOT the setup.ini file found in the FPS Creator folder, this is the script found in "Files\languagebank\english\gamebank\mygame") so that all of the internal HUDs have names. You can simply put a "hudname=X" command in front of each "hudmake" command.
- Now that each of those HUDs have names, you can use those names in other scripts to hide/show the HUDs as you see fit.




The one and only,


Butt monkey
17
Years of Service
User Offline
Joined: 7th Dec 2006
Location: Scotland
Posted: 23rd May 2009 00:39
Thanks alot guys I've got it sorted.
Impaler
16
Years of Service
User Offline
Joined: 20th May 2008
Location: Everywhere...at the same time
Posted: 29th Jun 2009 03:01 Edited at: 29th Jun 2009 03:03
Edit: sorry accidentally posted in thread instead of starting new one.

Login to post a reply

Server time is: 2024-11-25 01:56:44
Your offset time is: 2024-11-25 01:56:44