A simple example, an antivenom potion casting a poison shield after drinking it.
my code is:
Code: Select all
defineObject{
name = "potion_cure_poison",
class = "Item",
uiName = "Antivenom",
model = "assets/models/items/flask_full.fbx",
gfxIndex = 149,
consumable = true,
potion = true,
onUseItem = function(self, champion)
playSound("consume_potion")
champion:setCondition("poison", 0)
champion:setCondition("poison_shield", 120)
return true
end,
weight = 0.6,
}

it's identical to the original asset, except for the line 'champion:setCondition("poison_shield", 120)'
Thank you all!
