No empty flask after using a potion?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

No empty flask after using a potion?

Post by crisman » Sat Feb 02, 2013 7:53 pm

I just realize now none of my modded potions spawn an empty flask after using them.
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,
	}
What am I doing wrong? :cry:
it's identical to the original asset, except for the line 'champion:setCondition("poison_shield", 120)'
Thank you all! :D

User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: No empty flask after using a potion?

Post by LordGarth » Sat Feb 02, 2013 8:01 pm

add this

emptyItem = "flask"

LordGarth
Dungeon Master and DOOM will live forever.

User avatar
LordGarth
Posts: 500
Joined: Mon Jun 18, 2012 5:07 pm
Location: Colorado USA

Re: No empty flask after using a potion?

Post by LordGarth » Sat Feb 02, 2013 8:16 pm

put a , after "flask" of course

LG
Dungeon Master and DOOM will live forever.

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: No empty flask after using a potion?

Post by crisman » Sat Feb 02, 2013 8:28 pm

Many thanks, that did the trick ;)

User avatar
Komag
Posts: 3637
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: No empty flask after using a potion?

Post by Komag » Sat Feb 02, 2013 8:34 pm

so that means this isn't working correctly:
potion: a boolean flag which indicates that the item is a potion. Potions are turned into empty flasks when consumed.
but at least there is a workaround :)
Finished Dungeons - complete mods to play

User avatar
crisman
Posts: 305
Joined: Sat Sep 22, 2012 9:23 pm
Location: Italy

Re: No empty flask after using a potion?

Post by crisman » Sat Feb 02, 2013 8:51 pm

That's exactly what I was thinking...
The weird thing is it's the first time I notice that, and I have plenty of modded potions...
Am I too much distracted, or it's a new bug of a recent update?...
Anyway with this workaround it won't bother anymore me if it's a bug or not :mrgreen:

Post Reply