Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tinderbox inventory detection or Reset ignite property: I need one!
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#21
RE: Tinderbox inventory detection or Reset ignite property: I need one!

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

Tutorials: From Noob to Pro
10-03-2011, 03:14 PM
Website Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#22
RE: Tinderbox inventory detection or Reset ignite property: I need one!

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.

(This post was last modified: 10-03-2011, 03:19 PM by DRedshot.)
10-03-2011, 03:19 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#23
RE: Tinderbox inventory detection or Reset ignite property: I need one!

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

Tutorials: From Noob to Pro
10-03-2011, 03:44 PM
Website Find




Users browsing this thread: 2 Guest(s)