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!
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#11
RE: Tinderbox inventory detection or Reset ignite property: I need one!

"tinderbox" didn't work?

Actually now that I think of it, tinderboxes aren't really an inventory item anyway.
(This post was last modified: 10-03-2011, 12:07 AM by MrBigzy.)
10-03-2011, 12:05 AM
Find
Your Computer Offline
SCAN ME!

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

I've decided to go with an ever-regenerating tinderbox supply for my purpose. However, if anyone has managed to get this to work otherwise, please post!

Tutorials: From Noob to Pro
10-03-2011, 03:24 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#13
RE: Tinderbox inventory detection or Reset ignite property: I need one!

I believe you're looking for "OnIgnite" type? To make sure the player actually ignites a lamp before running your script. I had to utilize this when I scripted multiple lights to fade in after a player lit their corresponding candle/lantern/lamp.

void Ignite(string &in entity, string &in type)
{
if(type == "OnIgnite") //Do stuff
}

10-03-2011, 04:47 AM
Find
Your Computer Offline
SCAN ME!

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

(10-03-2011, 04:47 AM)palistov Wrote: I believe you're looking for "OnIgnite" type?

Whoops, i misspelled the value in my previous post, but in my script i had "OnIgnite".

Wait, that gives me an idea. Nope, idea didn't work.

Tutorials: From Noob to Pro
(This post was last modified: 10-03-2011, 04:57 AM by Your Computer.)
10-03-2011, 04:52 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#15
RE: Tinderbox inventory detection or Reset ignite property: I need one!

Ahh OK. Well SetLampLit("cannon", false, true); should work. Perhaps make a separate function in case there is an issue setting a lamp unlit as a result of it being lit (sounds strange haha).

void Ignite(string &in entity, string &in type)
{
if(type == "ignite") AddTimer("unlit", 0.01, "Unignite");
}

void Unignite(string &in timer)
{
SetLampLit("cannon", false, true);
}

or try this too:


void Ignite(string &in entity, string &in type)
{
if(type == "ignite") Unignite();
}

void Unignite();
{
SetLampLit("cannon", false, true);
}

(This post was last modified: 10-03-2011, 05:08 AM by palistov.)
10-03-2011, 05:07 AM
Find
Your Computer Offline
SCAN ME!

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

SetLampLit() doesn't reset the ability to light the entity again after the callback has been called.

Tutorials: From Noob to Pro
10-03-2011, 05:28 AM
Website Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#17
RE: Tinderbox inventory detection or Reset ignite property: I need one!

Hmm, interesting. I'm stumped then. Hopefully someone can come up with a clever solution :3

10-03-2011, 05:50 AM
Find
MrBigzy Offline
Senior Member

Posts: 616
Threads: 18
Joined: Mar 2011
Reputation: 8
#18
RE: Tinderbox inventory detection or Reset ignite property: I need one!

There must of been a time in the main game where you lit a lamp, the wind blew them out and you could light them again...hmm...
10-03-2011, 11:12 AM
Find
Your Computer Offline
SCAN ME!

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

(10-03-2011, 11:12 AM)MrBigzy Wrote: There must of been a time in the main game where you lit a lamp, the wind blew them out and you could light them again...hmm...

I would still run into the same issue if i were to duplicate it and use SetEntityCallbackFunc().

Tutorials: From Noob to Pro
10-03-2011, 02:55 PM
Website Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#20
RE: Tinderbox inventory detection or Reset ignite property: I need one!

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?

10-03-2011, 03:01 PM
Website Find




Users browsing this thread: 1 Guest(s)