Page 1 of 1
How to tell lit/extinguished torches in a sconce?
Posted: Thu Jan 17, 2013 8:53 pm
by Duncan_B
I know I can specify if a torch holder has a torch or not, but how can I find if the torch in the sconce has fuel? Would I have to do this individually for every possible torch that could go into a torch holder?
Re: How to tell lit/extinguished torches in a sconce?
Posted: Thu Jan 17, 2013 9:13 pm
by Komag
There is no way that I know of, other than to track it the entire time.
If the only way a torch can get into a torch holder is by the party putting it there, then you can run a repeating check whenever the player is standing in front of the torch holder and check the mouseItem if it is a torch and how much fuel it has, and if the mouseItem WAS a torch but is now empty then if the torch holder is suddenly full then that torch must have gone into the torch holder
Re: How to tell lit/extinguished torches in a sconce?
Posted: Fri Jan 18, 2013 7:55 am
by Balthasar
Maybe you can use a custom alcove that looks like a sconce to accomplish whatever your in-game goal is?
Re: How to tell lit/extinguished torches in a sconce?
Posted: Fri Jan 18, 2013 11:21 am
by petri
Find the entity in the torch holder (e.g. using entitiesAt) and check for fuel using getFuel()?
Re: How to tell lit/extinguished torches in a sconce?
Posted: Fri Jan 18, 2013 4:04 pm
by Komag
that can work well if there is no torch on the ground there