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 / Custom variables on the HUD? HALP MEH

Author
Message
TheVoxyn
13
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 6th Oct 2011 07:28
Okay, I've searched through the forums a few times and am confident that this hasn't been asked/answered before...

I'm still a huge n00b when it comes to FPI scripting, so I know I did something wrong lol. I'm trying to get a custom variable to appear on the HUD that increases every time the player picks up a certain item. It's kind of like an achievement system... kind of. Anyways, I can't get the variable to show up on screen and nothing changes when you pick up one of the items.

I put the custom variable bits in right after the part in the setup.fpi where the ambiance and fog settings are. It looks like this


I only found a brief mention of the dimvar, hudtype=6, and huduservar bits on the forum, so I'm not sure I'm even using the commands properly. Halp pl0x?

THIS IS A SIGNATURE. I swear.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Oct 2011 08:02
You've done a pretty good job there, the only thing I can think that is out of place is "hudmake", this should be the last command used on this line to make sure the HUD is created correctly. Try moving hudmake to the end.

I'm also assuming you're using v118 as these commands will not work with anything older.

TheVoxyn
13
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 6th Oct 2011 10:18 Edited at: 6th Oct 2011 10:19
Yeah, I'm running 1.18 vanilla. Weeeeell, I tried that... sadly, there's still nothing showing up on the hud. I'll continue to fiddle with it.

THIS IS A SIGNATURE. I swear.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Oct 2011 10:26
ah - i've spotted it - you've got "showhud" when it should be "hudshow".

You don't actually need "hudshow" at all, instead add "hudhide=0" into the HUD creation line should make the HUD visible at all times.

TheVoxyn
13
Years of Service
User Offline
Joined: 13th Sep 2011
Location:
Posted: 6th Oct 2011 20:45
Alright, I've managed to get it working for now. Apparently, it just didn't want to work in the setup.fpi, so instead I made a new script and tossed the lines from the setup.fpi into it and attached the script to a trigger zone outside of the level. That did the trick, though I have yet to see if the variable will carry over to the next level. Thanks for the help, Ched. I appreciate it!

THIS IS A SIGNATURE. I swear.

Login to post a reply

Server time is: 2024-11-24 05:08:57
Your offset time is: 2024-11-24 05:08:57