Components

TOOLEarthworm
MATFishing hook


Script Details

Condition

quantity _tool1 > 0 && _owner getVariable ['isUsingSomething',0] == 0

Action

if((typeOf _material1) == 'Consumable_Hook')then{_res = ['Consumable_Bait',_owner] call player_addInventory;
}else{_res2 = ['Consumable_BoneBait',_owner] call player_addInventory;
};
_tool1 addQuantity -1;
 if(quantity _tool1 == 0)then{deleteVehicle _tool1;
};
[_owner,'I have made a fishing bait.','colorAction'] call fnc_playerMessage;

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!