Need help?
Create a topic in the appropriate section
Don't write everything in the chat!Take a look at the marketplace
There you can buy
everything related to game serversDon't want a ban?
Please read our rules
Don't disturb the order!Sell or buy?
Use services of the guarantor
We will make your deal safe
- 0
-
Our picks
Помогите решить задачку,
В ванильке на слоте маски есть CanEatAndDrink, соответственно правив наследование маски в ItemBase на "AllowFoodConsumption - return false", то все работает, персонаж не кушает и не пьет.
Добавив в скрипт "headgear", и так же добавляя параметр "AllowFoodConsumption " в ItemBase - не робит. Думаю я начудил что то не так
override bool CanEatAndDrink() { ItemBase mask = ItemBase.Cast(GetInventory().FindAttachment(InventorySlots.MASK)); return (!mask || (mask && mask.AllowFoodConsumption())); ItemBase headgear = ItemBase.Cast(GetInventory().FindAttachment(InventorySlots.HEADGEAR)); return (!headgear || (headgear && headgear.AllowFoodConsumption())); }
Share this post
Link to post
Share on other sites