Frictional Games Forum (read-only)
Tinderbox inventory detection or Reset ignite property: I need one! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Tinderbox inventory detection or Reset ignite property: I need one! (/thread-10563.html)

Pages: 1 2 3


RE: Tinderbox inventory detection or Reset ignite property: I need one! - Your Computer - 10-03-2011

(10-03-2011, 03:01 PM)Tanshaydar Wrote: I have a very weird workaround, but did you think of using create entity at area? I'm thinking that canon would be static, not that we would move it?

In my story the cannon will be placed on top of objects that themselves move based on player events.


RE: Tinderbox inventory detection or Reset ignite property: I need one! - DRedshot - 10-03-2011

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.

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.



RE: Tinderbox inventory detection or Reset ignite property: I need one! - Your Computer - 10-03-2011

(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.