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 to display custom variable?

Author
Message
Pbcrazy
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: ...pillow room...
Posted: 4th Sep 2011 03:05
I have an idea how to do this, sort of, but I want to make sure it's possible.

I'm wanting to create a score system. Kind of like in an arcade or Arcade Mode in Modern Warfare (no, I'm not making a fan game/clone, just need a system similar), where players get points for killing enemies (say +10pts), and I want them to be able to see how many points they've gotten.

I was reading over some material, and I saw that you can create custom variables, using:


So, if I have this write, underneath all the fog and ambiance code in the setuplevel.fpi, I could add say...



That should create a global variable that I can access and edit later.

Now, I also want to setup a custom HUD element to display this variable to the player. Browsing through the reference, I found this...



So, again, I should be able to put...



... within the setuplevel.fpi and get it to display my custom variable to the screen similar to the lives or ammo or health counter.

I'm about ready to test it myself, but talking theory never heart. I'd love to hear what other people know about this.

Thanks,
-Pb

The voices in my head said I'm normal... o.0
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 4th Sep 2011 22:47
Hi Pb,

You will also need to name your HUD, and 'un'hide it, by using hudhide=0, otherwise the HUD will be invisible. Also i think the huduservar= command needs to be before the hudmake command and as the hudmake command finalises all the HUD settings.

Hope this helps.

Pbcrazy
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: ...pillow room...
Posted: 5th Sep 2011 07:28
Alright, tried what you said, still didn't work. :/



The voices in my head said I'm normal... o.0
Gamer X
16
Years of Service
User Offline
Joined: 1st Feb 2008
Location: Planet X
Posted: 6th Sep 2011 00:25
I read over the first post and then the one above this post. I suggest you remove hudhide=0 or at least change it to hudhide=1. other then that, it should work assuming you are using Version 18 of FPSC or mods made off of it or any other mods that has Ply's variable system.

Pbcrazy
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: ...pillow room...
Posted: 6th Sep 2011 04:29
nope, it's not displaying anything...



The voices in my head said I'm normal... o.0
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 6th Sep 2011 11:07 Edited at: 6th Sep 2011 11:08
Try this:



Hockeykid
DBPro Tool Maker
17
Years of Service
User Offline
Joined: 26th Sep 2007
Location:
Posted: 11th Sep 2011 10:44
Give this a try:

Attach this to a trigger zone



and at the beginning of your enemies' death scripts add



Login to post a reply

Server time is: 2024-11-24 05:25:35
Your offset time is: 2024-11-24 05:25:35