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 / Is is possible to toggle the Health hud on and off?

Author
Message
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 15th Nov 2012 09:12
Hello,

I am working on a project where as the player has a pda type device as a main hud which has his stats i.e. health, weapon,ammo. the player has the option to see a screen shot before he enters a room displayed on the screen of the pda. The player has the option to zoom in and zoom out. I am using the Scancodkeypressed here to essentially switch between huds. The zoomed in version takes up the whole screen of the pda, where as the zoomed out is just a thumbnail. My question is when I call up the zoomed in version the health hud is in the way.

Is there a way using the scancodekeypressed to unshow the health hud while viewing the zoomed in screenshot?

I tried adding the scancodekeypressed condition to the setuplevel and had the key pressed the same as the key to pull up the zoomed hud. But no luck.

I apologize for not including screen shots to better explain what I am trying to do. But I am at a work computer at the moment.
Meows
13
Years of Service
User Offline
Joined: 12th Oct 2011
Location: Totally over the Rainbow
Posted: 23rd Nov 2012 16:55
I bet there is a way. And the magic answer I think will be reading all of NorthernFox's threads.

I would suggest trying the multi MAP threads and
from reading your post use Keypressed to hide and display the Health Hud,

hope it helps


Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 23rd Nov 2012 17:04
@meows,

Thanks for the response. I have tried to accomplish what I need with a script and the scancode key pressed. I think however because the health hud is part of the global script I have to edit the levelsetupini which I have tried and I can't seem to get it to work. I just thought id pose the question and see if there was something I was missing.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2012 17:13
Quote: "Thanks for the response. I have tried to accomplish what I need with a script and the scancode key pressed. I think however because the health hud is part of the global script I have to edit the levelsetupini which I have tried and I can't seem to get it to work. I just thought id pose the question and see if there was something I was missing."


The huds defined in the script are only controlled by that script. If the "setuplevel.fpi" defines the huds, then only that script will control it. You can't control huds in a script that does not define them.

However, I have a development where we can enable/disable the health and numeric huds via key. In order for it to work, I had to remove them from the "setuplevel.fpi" script, then put in a script in the level(s).

Here is the "setuplevel.fpi" script for the development. Notice I've commented out the health, weapon, and numeric huds.



Here is the script I use to show/hide the health hud via "H" key. It is attached to a trigger in each level we design.



This works for us in the current version we run. I can toggle the health, lives, and numeric hud at any time and toggle off. Feel free to modify it to your needs, but it gives you a starting point.


There's no problem that can't be solved without applying a little scripting.
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 23rd Nov 2012 18:51
@blackFox,

Thanks once again for your insight. That is so simple why didn't I think of that. having trouble seeing the forrest through the trees.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 23rd Nov 2012 19:15
No problem. We do a lot of customizations in our developments, so things like this are easy to post and share.


There's no problem that can't be solved without applying a little scripting.

Login to post a reply

Server time is: 2024-11-23 19:31:51
Your offset time is: 2024-11-23 19:31:51