Jump to content
Sign in to follow this  
CAPSLOCK

Money variable

Recommended Posts

I am creating a script for money as seen in my other thread, but I am having a little trouble with it. When I use the setvariable command to make the player have an amount of money I can't get the variable to display on the screen as a number. What is the script to display certain variables on the player's HUD?

Share this post


Link to post
Share on other sites

Suppose the variable "money" is what you store player's money in (I'm using global cause I'm assuming you'll be using it in many different scripts). Then:

hint format ["You have $%1", (money)];

The "%1" takes the value of the "money" varible.

Or:

_str = format ["You have $%1", (money)];

titleCut ["_str", "Plain Down"];

If you want to have it displayed on the bottom of your screen. That way you can controll for how long this is displayed by:

titleFadeOut <time>

Share this post


Link to post
Share on other sites

Thanks, now all I have to do is come up with a method of deducting and adding the variable number.

Edited by CAPSLOCK

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×