How to tell lit/extinguished torches in a sconce?

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
Duncan_B
Posts: 31
Joined: Wed Dec 19, 2012 8:43 pm
Location: Santa Cruz, Calif.-- USA

How to tell lit/extinguished torches in a sconce?

Post 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?
User avatar
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to tell lit/extinguished torches in a sconce?

Post 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
Finished Dungeons - complete mods to play
Balthasar
Posts: 32
Joined: Sun Dec 09, 2012 1:53 am

Re: How to tell lit/extinguished torches in a sconce?

Post by Balthasar »

Maybe you can use a custom alcove that looks like a sconce to accomplish whatever your in-game goal is?
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: How to tell lit/extinguished torches in a sconce?

Post by petri »

Find the entity in the torch holder (e.g. using entitiesAt) and check for fuel using getFuel()?
User avatar
Komag
Posts: 3654
Joined: Sat Jul 28, 2012 4:55 pm
Location: Boston, USA

Re: How to tell lit/extinguished torches in a sconce?

Post by Komag »

that can work well if there is no torch on the ground there
Finished Dungeons - complete mods to play
Post Reply