Page 1 of 2

Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 4:14 pm
by Aschema
Sorry if this question was already in there...
(i'm french sorry for my bad english)

I want to come in a small room where is an alcove with something inside. (a cap for exemple).
on the wall beside there is a text that says something like that "if you steal me you'll have 15 seconds to replace it".

What i need/want is when we pick up the item, (we see a secret door opening) but we have 15 seconds to put something back in the alcove to let the secret door openned. if not (ELSE :) ) the door will close definitely.
But i try to script it and it never works.

So clearely : when i pickup the item in alcove, it open a door and runs a 15sec timer. If i put any item back in the alcove, door will stay open, but if i don't do this, door will close...

Can anyone help me please ?

Aschema Daeva

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 4:24 pm
by Neikun
I think this can be done without scripting.
You will need a counter with an initial value of 15.
Set the timer to decrement the counter.
Have the the alcove on deactivate -> activate timer
and on activate -> deactivate timer and reset counter

EDIT: Bear in mind that I have not tested this. Either way, it should be a step in the right direction

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 4:45 pm
by Komag
if you want the door to close permanently I think you will need at least some scripting, unless you use a few counters which gets ridiculous fast

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 6:00 pm
by Aschema
ok Komag. but door closed permanantly is optional in fact.

Thx Neikun so i need Timer + Counter ?? I'm not sure but i will try...

Aschema Daeva

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 6:17 pm
by Aschema
i tried Neikun. It works only if i remove my CAP first and the timer begin only when i put an other item inside...
but i want the timer to start when i remove the item that is initially inside.
So when i remove the CAP inside, the timer start.

Maybe with "alcove:containeditems()" ??? i can't afford it...

:( :(

Any other ideas ???

Aschema Daeva

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 8:35 pm
by Komag
you link the alcove to the timer with deactivate as the event (and maybe you need the alcove to be activate always)

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 10:25 pm
by msyblade
Yes, think you left the alcoves "event" drop box in the inspector (on the timer connector) on activate (put something in) instead of deactivate (take something out).

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 10:48 pm
by Aschema
Thx.. Will try it again.

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 10:53 pm
by Aschema
Komag. Thx for reply. but what do you mean by "(and maybe you need the alcove to be activate always)" ???
There isn't option like that when you're not scripting...

Aschema Daeva

Re: Alcove Timer for secret door ?

Posted: Sat Oct 20, 2012 11:52 pm
by Komag
It's right in the alcove inspector