(10-03-2011, 03:19 PM)DRedshot Wrote: Why not take a look into the code used in the sewer map, where you turn the valves to pour the water into that reservoir. When you turn the handle, the wind blows the torches out. That script might work for you aswell.
Because i'm sure it uses most of the same methods i have already tried, since blowing the torches out is as easy as using SetLampLit() with false, which in itself would not prevent the candle or torch from being lit again. I doubt the sewer script is made to be called twice, and that is indirectly the issue. IIRC, the player is never placed in a situation where they are capable of lighting the same torch or candle multiple times where SetEntityCallbackFunc() is used on the lamp entity (i.e. where lighting a candle triggers an event). If i avoid using SetEntityCallbackFunc() and stick with SetEntityPlayerInteractCallback(), i can light the cannon several times; however, as mentioned previously, this also allows the user to set off the cannon without any tinderboxes. My current workaround for this is to automatically supply the user with tinderboxes.
If the original story would have required the user to light a candle multiple times in order to trigger an event multiple times, then i would not be having to find workarounds for my current purpose. However, as i recall, there is no such situation in the original story.
(10-03-2011, 03:19 PM)DRedshot Wrote: Also, is it essential that the cannon is placed on top of objects which can move? Because using CreateEntityAtArea might be the only good solution.
Yes, because i am trying to emulate a certain chase scene from Assassin's Creed. Also, the cannon balls are too heavy to be tossing far distances without the cannon.