Guest Posted September 30, 2013 How hard is it to make a money script, Like where you can shop, get money from doing objectives, etc... I don't really know how to start with this, any help is afcorse appriciated. ;) Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 Probably not the first script someone should make... :P Start by learning SQF. https://community.bistudio.com http://www.armaholic.com/page.php?id=9220 Start from small... Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Probably not the first script someone should make... :PStart by learning SQF. https://community.bistudio.com http://www.armaholic.com/page.php?id=9220 Start from small... It's not exactly the first one but as you can see by my avatar, I'm still a noob...But anyways is there any good pdf tutorials, or videos of some sort? :) Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 But anyways is there any good pdf tutorials, or videos of some sort? :) I just posted a link to one... ;) Everything starts from algorithm. The problem is that if you want some kind of graphical UI and MP compatibility (especially if it should be persistant) then this isn't an easy one to script... Share this post Link to post Share on other sites
Guest Posted September 30, 2013 I just posted a link to one... ;)Everything starts from algorithm. The problem is that if you want some kind of graphical UI and MP compatibility (especially if it should be persistant) then this isn't an easy one to script... Yeah, Well, I'm planning to make in MP compatible later...Any good tutorials on that? ^-^ Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 Not a specific money-system tutorial, no. Having tutorials for every single script would be impossibility. Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Not a specific money-system tutorial, no. Having tutorials for every single script would be impossibility. Well, Do you know how? ;) Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 Yes, but wouldn't that mean I'd have to script it for you..? ;) There might be some currency scripts already. Try searching them either here in the forums or on armaholic. Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Yes, but wouldn't that mean I'd have to script it for you..? ;)There might be some currency scripts already. Try searching them either here in the forums or on armaholic. Well, I'm not asking you to script for me :) I'm asking for some tips...Please? ^-^ ---------- Post added at 13:55 ---------- Previous post was at 13:49 ---------- Well, I'm not asking you to script for me :) I'm asking for some tips...Please? ^-^ As an example, How do you edit varibles from another script? Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 Commands I'd use to store the amount of currency the player has: setVariable, getVariable. Arma 3 control commands for the graphical UI. When player uses the graphical UI and buys a weapon, the script uses addWeapon. If player buys a vehicle, then createVehicle. As you can see, it's pretty hard to give tips without scripting it for you. ;) Edit: if the variable is global, you can use it in other scripts. Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Commands I'd use to store the amount of currency the player has: setVariable, getVariable. Arma 3 control commands for the graphical UI. When player uses the graphical UI and buys a weapon, the script uses addWeapon. If player buys a vehicle, then createVehicle.As you can see, it's pretty hard to give tips without scripting it for you. ;) Edit: if the variable is global, you can use it in other scripts. Can you give an example please? :p Share this post Link to post Share on other sites
Gekkibi 11 Posted September 30, 2013 Of what? Script X uses variables script Y created? // script Y myVariable = 1; // scripy X hint format ["%1", myVariable]; // prints 1 Local variables can't be used this way. Everything you need is in BIKI. You just have to start from basic algorithm and build it from there. ;) Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Of what? Script X uses variables script Y created?// script Y myVariable = 1; // scripy X hint format ["%1", myVariable]; // prints 1 Local variables can't be used this way. Everything you need is in BIKI. You just have to start from basic algorithm and build it from there. ;) _suspect = _this select 0; _interigator = _this select 1; _interigate_action = _this select 2; detainMoney = p1_money - 10; _interigator playmove "AinvPknlMstpSnonWrflDnon_medic3"; _suspect playmove "amovpercmstpssurwnondnon"; sleep 3; _interigator playmove ""; _suspect enablesimulation false; hintSilent "he is detained."; _interigator setVariable ["p1_money",detainMoney , true]; hint Format ['you have %1 dollars', p1_money]; // arrest him _suspect addAction ['Order to follow!','follow.sqf']; // uncuff him _suspect addAction ['uncuff him', 'uncuff.sqf', '_interigate_action']; _suspect removeAction 0; ______________________________________________________________________ In my other script there is a variable called p1_money, I want to make it so when someone detains someone they get -10 dollars, This script doesn't work atm, Any ideas on how to fix that? Share this post Link to post Share on other sites
chaoticgood 11 Posted September 30, 2013 I recommend reading focker's arma 3 scripting guide, it's on armaholic and covers setVariable. Share this post Link to post Share on other sites
Guest Posted September 30, 2013 I recommend reading focker's arma 3 scripting guide, it's on armaholic and covers setVariable. I already did, Thankyou anyways. :) Share this post Link to post Share on other sites
kylania 568 Posted September 30, 2013 Instead of using hard coded variables, use variables on the players or the server or something. This post here has an example of buying weapons using this system. Share this post Link to post Share on other sites
Guest Posted September 30, 2013 Instead of using hard coded variables, use variables on the players or the server or something. This post here has an example of buying weapons using this system. I'll try to figure out what you mean, Thankyou. ---------- Post added at 15:23 ---------- Previous post was at 15:07 ---------- Instead of using hard coded variables, use variables on the players or the server or something. This post here has an example of buying weapons using this system. I looked at you're link but do you mind explaining how exactly it works? Share this post Link to post Share on other sites