Hey guys,
I would like to add for my players the ability to use an action which would only appear to them if they met a specific criteria. The criteria is to have a specific backpack and inside it, a specific item.
I got the script responsible for the condition working, but only once I put it in the init.sqf. If I did it that way, the action would appear and remain available even after the condition was no longer fulfilled (the object being dropped for example). Naturally, I'd like to remove the action if the condition was no longer met.
I basically do not know how to check for the condition so that it always pops up for the player once he meets that criteria.
This is the script that I don't know how to call:
if ((unitBackpack Player isKindof "tfw_ilbe_a_gr") && ("tfw_rf3080Item" in (items player + assignedItems player))) then {Player addAction ["Test Action", "test_action.sqf"];}
Thanks!