Using/Consuming a potion?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
trancelistic
Posts: 275
Joined: Sat Jun 16, 2012 5:32 am

Re: Using/Consuming a potion?

Post by trancelistic »

Modraneth wrote:hi. it is possible to clone a potion to create a water breathing potion ?
i think i will need it to my mod and i cant make the definition to work
SpoilerShow

Code: Select all

cloneObject{
        name = "potion_waterbreathing",
        baseObject = "potion_poison",
        uiName = "Water Breathing Potion",
        description = "A potion created to breath under water.",
        consumable = true,
        potion = true,
        onUseItem = function(self,champion)
        champion:modifyStat(what do i place here??)
        playSound("consume_potion")
        return true 
        end
}
This code is for Legend of grimrock 1 ( Not sure if it works on Log 2 though)
Anyhows You should ask it in the LoG2 forum mate. This is in Log 1:)
Ps: I got no idea if its possible to make a water potion. But doesn't basic engery potion have the same purpose? Like make a potion like the elixer of life that will give all mana/energy if they are about to drown in the water. ( You can still consume a potion or food while onderwater ( Crazy I know lol) )
User avatar
Modraneth
Posts: 95
Joined: Thu Aug 27, 2015 8:27 pm
Location: Portugal

Re: Using/Consuming a potion?

Post by Modraneth »

trancelistic wrote:
Modraneth wrote:hi. it is possible to clone a potion to create a water breathing potion ?
i think i will need it to my mod and i cant make the definition to work
SpoilerShow

Code: Select all

cloneObject{
        name = "potion_waterbreathing",
        baseObject = "potion_poison",
        uiName = "Water Breathing Potion",
        description = "A potion created to breath under water.",
        consumable = true,
        potion = true,
        onUseItem = function(self,champion)
        champion:modifyStat(what do i place here??)
        playSound("consume_potion")
        return true 
        end
}
This code is for Legend of grimrock 1 ( Not sure if it works on Log 2 though)
Anyhows You should ask it in the LoG2 forum mate. This is in Log 1:)
Ps: I got no idea if its possible to make a water potion. But doesn't basic engery potion have the same purpose? Like make a potion like the elixer of life that will give all mana/energy if they are about to drown in the water. ( You can still consume a potion or food while onderwater ( Crazy I know lol) )
ahh sorry x)
i want a breathing water potion because its more appropriate to have it, i can make it with 2 evergy potion, but if the water breathing can make u breath under water for 1 min that would be cool
Mods:
Isle of Gunger
The Bloody Path Dropped
A World of Power work in progress
Post Reply