Accumulating COIN funds
I'm working on a mission that uses RUG_Inventory as a means for the player to purchase support assets. Some of those assets are available through the COIN module such as fortifications and static weapons. I've come across several scripts that allow the player to accumulate COIN funds but when trying them, they won't work for me.
To test them out I attached two actions to the player in the init.sqf. The first just sets a variable to 1 to satisfy the COIN action conditions and moves the COIN module to the player's position. This works fine. In another version of the mission it's all done with triggers to limit where the player can build.
The second action increases the player's COIN funds by 100. This is what I can't get working. I've tried a few combinations of my own attempts and two examples provided by Kylania and ArmaIIholic on this forum. Further searching has been pretty much fruitless.
I define the COIN parameters in the init.sqf as follows:
BIS_coin_0 setVariable ["BIS_COIN_actionCondition", "(COINsite >= 1");
BIS_coin_0 setVariable ["BIS_COIN_funds", "myMoney", 0);
BIS_coin_0 setVariable ["BIS_COIN_fundsdescription", "$");
//categories and items are defined in scripts called by triggers so they're location specific, the same is true with the value of COINsite.
I've seen in Kylania's script that only "myMoney" is set in the BIS_COIN_funds parameter but when I set mine up that way I get "scalar" instead of 0 as the funds amount. When it says "scalar" there is no limit to the funds - something I definitely don't want. I'd like it to start at 0 and increase by 100 when the second action is applied.
I've also tried a few simple getVariable and setVariable combinations that don't work either.
What I'd like to do is have a set of RUG_Inventory items that the player can buy from vendors to convert the RUG_money (RUG_Inventory's currency type) to COIN funds in predefined amounts (100, 500, 1000, 10000). Setting up RUG_Inventory items is very easy, you just paste the code you want executed into the item's code. The problem is I just can't come up with the right commands with the right syntax.
Any help would be deeply appreciated. This is the only thing holding me back from posting the first version of my mission.