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 / Two HUDs in one weapons chest FPI script

Author
Message
Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 24th Mar 2011 09:29 Edited at: 24th Mar 2011 09:32
Inspired by the Nazi Zombies weapons chest I am making a weapons chest for my game that can spawn a weapon by random chance. All that is working but I also want to give the player a notification if nothing is found in the chest (no weapon is spawned). I can't get this HUD to show on the screen and I must be doing something wrong.

My current code is this:



The problem is probably found in the state=3 section. The HUD in state=0 works fine.

I hope someone with more experience in HUDs can see the problem.

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 24th Mar 2011 13:57 Edited at: 24th Mar 2011 15:03
...HUDNAME=NOTHING should be created in state 0, along with HUDNAME=CREATE.

HUDs need to be cued up prior to the start of a script.

Conjured Entertainment
AGK Developer
19
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 24th Mar 2011 14:55 Edited at: 24th Mar 2011 14:57
Quote: "...HUDNAME=NOTHING should be created in state 0, along with HUDNAME=NOTHING. "


You mean, along with HUDNAME=CREATE?

Like Seth said, all of your HUDs should be created in state=0
That is because you only need to create the HUDs once.
Placing them in other states attempts to recreate them, which is asking for trouble.



Also, if you are using an empty state (like your state=4), then you don't even need it there. (see stock scripts for examples)

Seth Black
FPSC Reloaded TGC Backer
19
Years of Service
User Offline
Joined: 22nd Feb 2005
Location: Pittsburgh, PA
Posted: 24th Mar 2011 15:01
...my bad.

Pre-coffee attempt at thinking...

Scurvy Lobster
18
Years of Service
User Offline
Joined: 3rd Mar 2006
Location: Denmark
Posted: 24th Mar 2011 16:52 Edited at: 25th Mar 2011 10:55
Thanks guys! HUDs are new for me and I didn't know they needed to be started in state=0. Thanks for the help - it's awesome!


edit:
Finally got the time to use the new script and it works great. If anyone wants to use it simply add the scripts as a MAIN to a chest and set it as Dynamic and Unmoveable. Make sure the script activates a weapon (or any object really) that is placed on the chest. The object should be set to spawnable.

Login to post a reply

Server time is: 2024-11-24 10:32:09
Your offset time is: 2024-11-24 10:32:09