Components

TOOLKnife
TOOLDead fish


Script Details

Condition

!(isNull itemParent _tool2) && !(_tool2 isKindOf 'Food_Sardines')

Action

[_owner,'I have prepared the fish.','colorAction'] call fnc_playerMessage;
_max = getNumber (configFile >> 'CfgVehicles' >> typeOf _tool2 >> 'stackedMax');
deleteVehicle _tool2;
_guts = _owner createInInventory 'Food_SmallGuts';
_guts setQuantity 1;
for [{_x=0},{_x<_max},{_x=_x+1}] do{_fillet=['Meat_Fillet_Raw',_owner] call player_addInventory;
_fillet setQuantity (1-(0.1 + damage _tool1)+(random 1)/10);
};

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!