Jump to content

Recommended Posts

Hi! I'll cut to the chase!

I'm creating a single player sandbox scenario where I'd like to include a "money system" which allows the player to purchase certain weapons or clothing items after either having money added or subtracted as a result of completing / failing a task. I'd like not only to offer the Arma 3 community a cool scenario, but also a script framework for a SP money system, that other players can use in the future to save time! Trouble is, my scripting ability currently sits somewhere between novice and intermediate; seeing as this is a complex project requiring knowledge of dialogs (for GUIs) as well as scripting variables, I was hoping that you could share the best tutorials, tips and pointers relating to establishing variables for a scenario as well as interactive GUI menus called through an external script! (Also, I have read a number of other threads, and tried out some other player's scripts - believe me, reaching out like this is a last resort!)

Thanks for reading, and I hope you can just quickly send some advice my way, and for future readers!
Cheers :)

Share this post


Link to post
Share on other sites

Might be useful, posted this in another thread:

_dinero = _fnc_buscar_player getVariable ["MyDineros",0];
systemchat format ["%1 has %2 dineros!",_dinero]; //will return 0
-------------------------------------
_dinero = _fnc_buscar_player setVariable ["MyDineros",1500];
_dinero = _fnc_buscar_player getVariable ["MyDineros",0];
systemchat format ["%1 has %2 dineros!",_dinero]; //will return 1500

Also for proper money optical representation (15,400.32$ instead of 15400.32) take a look into this site, especially KK_fnc_strNumFormat.

Dialogs (GUIs) might be way out of your scope if you're completely new to scripting. Since you not only need to grasp how to set up a GUI using listBoxes, buttons, text fields,

you also need to write your own functions to make these things interactive, retrieve data from text input fields (withdraw cash from ATM), handle variables on button click (confirm withdraw of money from said ATM) and some other things.

Been diving into arma scripting since 2013, dialogs were the last things I touched (for good reason, heh).

Hit google as there's quite some good tutorials out there.

 

Cheers

Share this post


Link to post
Share on other sites

Cheers Grumpy Old Man! Thanks a lot for your help! I think I've got a grasp of the whole variables thing now, and I suppose you're right about the dialogs! I think I'll stick to hints for now ;)

Share this post


Link to post
Share on other sites

If you do decide to get into dialogs, here is my own tutorial. Hope it helps!

 

  • Like 1

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

×