Components

TOOLHacksaw
MATMosin 9130


Script Details

Condition

(isNull (_material1 itemInSlot 'weaponMuzzleMosin')) AND (isNull (_material1 itemInSlot 'weaponBayonetMosin')) AND (isNull (_material1 itemInSlot 'weaponOpticsMosin')) AND (isNull (_material1 itemInSlot 'weaponBipod')) AND (isNull (_material1 itemInSlot 'weaponWrap'))

Action

_result1 setDamage (damage _material1);
[_owner,format['I have crafted %1.',displayName _result1],'colorAction'] call fnc_playerMessage;
if (!isNull (_material1 itemInSlot 'magazine')) exitWith {_count = magazineAmmo (_material1 itemInSlot 'magazine');
_class = typeOf (_material1 itemInSlot 'magazine');
_ammo = _result1 createInInventory _class;
_ammo setVariable['quantity', _count];
};

What is this?

The condition and action scripts are bits of code used by the game to handle more complicated mechanics than can be expressed by just providing components and results.

The condition script adds restrictions on when a recipe can be crafted. If the expression in the condition evaluates to false, the recipe isn't available.
The action script allows the recipe to handle more complex inputs and outputs. For example, it's used when combining stacks of items to allow stacks of any sizes to be merged together.

No comments yet!
No screenshots yet!

Contribute

Log in or sign up to add your own comments!
Log in or sign up to add your own comments!