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 / display Hud by pressing a key

Author
Message
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Apr 2012 04:28
In my game I'd like to call up the objectives of the level by pressing a key. It seems like it would be a simple script but for some reason I can't figure it out.

In theory I would think I could take a "use" script edited the key used and add the hud line.

Any thoughts?
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Apr 2012 05:34 Edited at: 12th Apr 2012 05:37
Quote: "Any thoughts?"


Not possible. (kidding)

You can define your hud(s), then set the key you want to use, and when the key is pressed, the hud(s) displays.

Here is an example of a script I use to show a map. It contains multiple map huds the player scrolls through by pressing the M key. I attach this to a trigger that is spawned (activated) once the player picks up the map in the level.



That should help get you in the right direction.


Twitter: @NFoxMedia
Troutflies
13
Years of Service
User Offline
Joined: 24th Feb 2011
Location: Stuck outside my map.
Posted: 12th Apr 2012 07:19
FOx,

Your post got me thinking Couldn't I add the scancodekey condition to the pickup.fpi? So once I pick up the item the key I designate will be active?

Will the player be able to only call up the hud while he is in the triggerzone?

What I'd like to do is have the player start the level enter a story zone which will play a computer screen type display where each letter of the objectives are typed out on the screen. Then I would like the player to be able to call up a screen shot of the ojectives while he is working through the level.

I have been trying to write the script and experiment trying to make it work, but I am defeated.
BlackFox
FPSC Master
16
Years of Service
User Offline
Joined: 5th May 2008
Location: Knight to Queens Bishop 3
Posted: 12th Apr 2012 07:41
Quote: "Will the player be able to only call up the hud while he is in the triggerzone?"


If you use this...

;Plr in Zone
:state=1,plrwithinzone=1:state=2

...then it will only show the hud(s) via the key pressed once they are in the zone. In other words, using my example, until the player picks up the map which spawns the trigger right where the player is (therefore the player is in the zone), pressing M will not show the map.

Quote: "What I'd like to do is have the player start the level enter a story zone which will play a computer screen type display where each letter of the objectives are typed out on the screen. Then I would like the player to be able to call up a screen shot of the ojectives while he is working through the level."


If you are wanting to show a single hud on a key pressed anywhere at anytime, then you can use the following script and attach to a trigger zone:



Or once your story zone is completed, the script for that can spawn the trigger which allows the player to press a key to show their objectives hud. There are many ways to do it. This is one of the easier ways I could extract from our developments to use as an example. We have more of them, but they are very detailed and tie into other huds and such and I did not want to confuse you with the "extras".


Twitter: @NFoxMedia

Login to post a reply

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