Jump to content

[Tutorial] DZMS with Single Currency


Recommended Posts

Before I get into this...
THANK ZUPA FOR THE SCRIPT!

DZMS Ai with Gold Coins Script / Addon

Onto the tutorial!

Open up: DZMSAISpawn.sqf which is located in:

Server.pbo > DZMS > Scripts

Once you've opened up DZMSAISpawn.sqf, search for this:

//Add the behaviour
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "FSM";
_unit setCombatMode "YELLOW";
_unit setBehaviour "COMBAT";

Below the last line add this:

//Zupa Currency
_unit setVariable["headShots",20,true];

So it will look like this:

//Add the behaviour
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "FSM";
_unit setCombatMode "YELLOW";
_unit setBehaviour "COMBAT";
//Zupa Currency
_unit setVariable["headShots",20,true];

Once you have done this repack and upload! Your done!

Configuration

Value
 

If you want to change the value of the money spawning on each AI,change the value:

_unit setVariable["headShots",20,true];

to

_unit setVariable["headShots",WHATEVER YOU WANT,true];

Souls HIVE

If you are using Souls HIVE, then instead of:

_unit setVariable["headShots",20,true];

Change to:

_unit setVariable["CashMoney",5000,true];

Variable Value

If you want the AI to spawn variable values then add this:

 _cash = round(random 20) * 1000; // number between 0 and 20 000

Above this:

_unit setVariable["headShots",20,true];

But change the line above to

_unit setVariable["headShots",_cash,true];

This will spawn money on the AI between 0 and 20,000 Gold Coins on each AI






Special thanks to:
MCPimpin - Original Poster
Zupa - Single Currency and AI Addon
Soul - Custom Hive for Single Currency
TheVampire - DZMS

Links:




I take no credit, just informing people!

See it working at: 
206.221.176.66:2602

Link to comment
Share on other sites

  • 3 months later...

Hi, thx for sharing but somethimes it happens when checking wallets of DZMS AI's:

You took <NULL>  coins, ID says <NULL>!

All coins on screen are gone only solution -> relog

Anyone a solution for this?

 

I use this code in my DZMSAISpawn.sqf:
    //Zupa Currency
     _cash = round(random 20) * 100; // number between 0 and 20 00
    _unit setVariable["cashMoney",_cash,true];

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Hi, thx for sharing but somethimes it happens when checking wallets of DZMS AI's:

You took <NULL>  coins, ID says <NULL>!

All coins on screen are gone only solution -> relog

Anyone a solution for this?

 

I use this code in my DZMSAISpawn.sqf:

    //Zupa Currency

     _cash = round(random 20) * 100; // number between 0 and 20 00

    _unit setVariable["cashMoney",_cash,true];

 

I too had this issue.  I tried it all different ways including just setting a static amount of gold without the random.  Ultimately I had to remove the call from DZMS and WAI and just use it with DZAI which seems to work flawless. btw, I use the SC 3.0.

Link to comment
Share on other sites

  • 1 month later...

not sure if u still looking but i have this dzmsaispawn.sqf

where i have my coins for the ai and works just fine no issues

same for wai

 

 

//Lets spawn the unit
_unit = _unitGroup createUnit [_aiskin, [(_position select 0),(_position select 1),(_position select 2)], [], 10, "PRIVATE"];
 
//Make him join the correct team
[_unit] joinSilent _unitGroup;
 
//Add the behaviour
_unit enableAI "TARGET";
_unit enableAI "AUTOTARGET";
_unit enableAI "MOVE";
_unit enableAI "ANIM";
_unit enableAI "FSM";
_unit setCombatMode "RED";
_unit setBehaviour "COMBAT";
 
//bank
        _cash = round(random 10) * 50; // number between 0 and 20 000
 
                // Soul Hive
_unit setVariable["CashMoney",_cash ,true];
 
//Remove the items he spawns with by default
removeAllWeapons _unit;
removeAllItems _unit;
Link to comment
Share on other sites

  • 10 months later...
  • 2 months later...
  • 11 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...