How to get the stacksize? or quanity of a stackable item
How to get the stacksize? or quanity of a stackable item
I wanted to check if a certain amount of money has been placed into an alcove - money is totaled as stacksize (i.e. quanity) which can be hundreds or thousands - so they cant do each indivdually.
If they put some money with stacksize of 100 how can i check in standard alcove code...
example...
for i in altar_gold:containedItems() do
if i.name == "dollars" then
quanity = i:getStackSize() -- of course this doesnt work but shown for example
end
end
If they put some money with stacksize of 100 how can i check in standard alcove code...
example...
for i in altar_gold:containedItems() do
if i.name == "dollars" then
quanity = i:getStackSize() -- of course this doesnt work but shown for example
end
end
- Shloogorgh
- Posts: 45
- Joined: Sat Sep 22, 2012 12:24 am
Re: How to get the stacksize? or quanity of a stackable item
maybe you could use i:getWeight()
and use an equation to figure out the amount of money based on the weight of the stack
and use an equation to figure out the amount of money based on the weight of the stack
Re: How to get the stacksize? or quanity of a stackable item
I'll add Item:getStackSize() for the next version.
Re: How to get the stacksize? or quanity of a stackable item
Good Guy Petri
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
Re: How to get the stacksize? or quanity of a stackable item
Now thats service... LOL!I'll add Item:getStackSize() for the next version.
- cromcrom
- Posts: 549
- Joined: Tue Sep 11, 2012 7:16 am
- Location: Chateauroux in a socialist s#!$*&% formerly known as "France"
Re: How to get the stacksize? or quanity of a stackable item
Yes, it will be very helpfull, no more add one by one stuff on altars ^^ thanks
A trip of a thousand leagues starts with a step.
- djoldgames
- Posts: 107
- Joined: Fri Mar 23, 2012 11:28 pm
- Contact:
Lock consume all stacked keys
Great!petri wrote:I'll add Item:getStackSize() for the next version.
And what about "multiconsumable" locks?
If I create stackable keys, there is a little problem in the game - if you use items (keys) stacked together, the lock will consume all of them!
...feature?
[MAP] Interactive Maps of Isle Nex - using Google maps technology
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
Re: How to get the stacksize? or quanity of a stackable item
You could try my double lock custom asset.
But that's only if you need two keys..
But that's only if you need two keys..
"I'm okay with being referred to as a goddess."
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
Community Model Request Thread
See what I'm working on right now: Neikun's Workshop
Lead Coordinator for Legends of the Northern Realms Project
- Message me to join in!
- djoldgames
- Posts: 107
- Joined: Fri Mar 23, 2012 11:28 pm
- Contact:
Re: How to get the stacksize? or quanity of a stackable item
Yes I know of it, thanks. But I thought something else...Neikun wrote:You could try my double lock custom asset.
But that's only if you need two keys..
Problem is: when we use stacked keys (4 keys together on mousecursor) on One lock, the lock will consume all of them! I need to one lock consumes only one item.
[MAP] Interactive Maps of Isle Nex - using Google maps technology
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
[MOD] Eye of the Beholder: Waterdeep Sewers - recreation for Grimrock
www.oldgames.sk
Re: How to get the stacksize? or quanity of a stackable item
I'm not sure I like the idea of stacked keys, there shouldn't be that many keys around in my opinion, but I guess in certain circumstances it could be alright or make sense
Finished Dungeons - complete mods to play