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 / Ply's Mod Variable Visualization

Author
Message
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 16th Apr 2009 03:16
I have a question, maybe there's something I'm missing, but how do you show a variable as a numeric HUD? I couldn't seem to find this is the readme...help would be nice.


"March 1st 2009, 12:49pm, a 3 year struggle with cancer ends..."
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 21st Apr 2009 04:24
Any help? Ply perhaps?


"March 1st 2009, 12:49pm, a 3 year struggle with cancer ends..."
Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 21st Apr 2009 13:49
you could load a hud for each value and display it when the variable equals a specific number. If it is a large spectrum of #s that could make FPSC cranky though.

...
Crusader2
16
Years of Service
User Offline
Joined: 8th Aug 2008
Location: Somewhere...
Posted: 21st Apr 2009 20:07
There is a printvar=X command that prints the variable named X to the screen.

Best,


Some people say that I'm crazy... And I agree.
USE PLY'S MOD!
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 22nd Apr 2009 04:02
Grazas crusader!!!


"March 1st 2009, 12:49pm, a 3 year struggle with cancer ends..."
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 22nd Apr 2009 13:48
Also, try asking Ply, I know he set up his own numerical variables at one time, that match all the others, I believe you can see it in his video.

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 24th Apr 2009 06:06
No need to use Printvar. That is STRICTLY for debugging purposes, since it looks hideous compared to everything else, lol.

Here's an example script (My Armor script) that creates a numeric HUD for a user variable:


You'll notice on the second line of the script, it creates an actual NUMERIC HUD!! The special thing about this HUD is that it was told "huduservar=PlrArmor" which binds that variable to the HUD. Now, this HUD will automatically update based on that variable's value. Also, note that the hudtype is set to 6... this is a special hudtype that allows you to use variables on it, and you MUST set the hudtype to this before setting the "huduservar"


Annnnnnnd, holy cr@p, this isn't in the manual.
Hope this helps anyone else wondering the same thing.


The one and only,


Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 24th Apr 2009 13:27
Thanks for clearing that up Ply. I had no clue you could do that

...
meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 25th Apr 2009 03:37
I knew you mentioned it to me and said look in the manual, but I didnt find it and figured I must be dumb lol. Off topic I think Errant said with Ply's you could do ammo pooling, but I havent seen anything in the manual

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Plystire
21
Years of Service
User Offline
Joined: 18th Feb 2003
Location: Staring into the digital ether
Posted: 26th Apr 2009 02:26 Edited at: 26th Apr 2009 02:28
Sorry, meteorite, but that one is in the manual.

Here it is, straight from the gunspec section:
Quote: "BindAmmoToVar = X (Binds the weapon’s Clip ammo (Not ammo in the gun) to variable X, and autodeclares the variable)"


Add that option to your gunspec like so:


Do that for all of the guns that you want to share the same ammo pool. Probably weapons that would use a 45mm round (whatever the heck that would be... I'm not a weapons expert, there might not even be a weapon that uses that for all I know, lol)

Now, when you want to give the weapon more ammo, simply add to that variable like so:


Or something similar to that. Basically, you just add to the variable and the ammo gets updated accordingly. You can also check the pool by simply checking the variable since that variable directly controls the ammo and is directly effected by ammo consuming routines (like reloading).


There... in one simple gunspec option, you have full control (almost...) over the ammo pool and have, in the process, decided which weapons are part of that ammo pool.



Damn, I feel so smart.
Time to go do homework and get rid of that notion before my ego over-inflates.


(FYI, this has received minimal testing by me, myself and I, so if you find a bug, let me know ASAP. I am fairly confident that it works, though, since my "fantasy" video showed it off as a form of "Mana", which was the ammo pool for all of the spell weapons I had used in the vid)


The one and only,


meteorite
18
Years of Service
User Offline
Joined: 19th Nov 2006
Location: The Capital Wasteland
Posted: 26th Apr 2009 20:50
Ah, thanks, I wondered about that one

"I can't imagine what this place would have been like if I hadn't found you here." - BJ Hunnicutt
Pride
16
Years of Service
User Offline
Joined: 22nd Dec 2007
Location: Eastern USA
Posted: 4th May 2009 04:37
Thanks y'all, finally got it working!


"Tempo non é só unha teoría, senón unha forza"
Try and figure it out

Login to post a reply

Server time is: 2024-11-25 00:25:17
Your offset time is: 2024-11-25 00:25:17