MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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!
|
|
10-03-2011, 03:24 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
(This post was last modified: 10-03-2011, 04:57 AM by Your Computer.)
|
|
10-03-2011, 04:52 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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.
|
|
10-03-2011, 05:28 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
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 |
|
MrBigzy
Senior Member
Posts: 616
Threads: 18
Joined: Mar 2011
Reputation:
8
|
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 |
|
Your Computer
SCAN ME!
Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation:
235
|
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().
|
|
10-03-2011, 02:55 PM |
|
Tanshaydar
From Beyond
Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation:
67
|
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 |
|
|