Page 1 of 1

Clarification required of activation types

Posted: Thu Jan 29, 2004 12:29 pm
by Gambit37
I'm having a bit of a nightmare building a particular structure in my sample dungeon and I think it's because I don't really understand the activation types.

George, can you clarify the following:

1) If I have a single image wallitem acting as an actuator, and I TOGGLE it, It does what I expect -- sets it from VISIBLE to INVISIBLE. What is the difference with ACTIVATING/DEACTIVITING this object?

2) What happens when ACTIVATING such wallitems once they have been TOGGLED at least once

3) Can the mouse still interact with these wallitems if they are INVISIBLE? I'm getting odd results...

Basically, I have four images on the same tile. The first toggles itself invisible, and the next invisible one to visible. And so on until the last one. This bit all works fine.

With the last object, I TOGGLE all the four items again. I would expect this to put them back to their initial state: The top most one VISIBLE, and the bottom 3 INVISIBLE. But it's not quite doing what I expect. ACTIVATING them rather than TOGGLING produces diffreent results, haven't tested that properly yet.

Any light you can shed on the matter would be appreciated.

Posted: Thu Jan 29, 2004 3:43 pm
by George Gilbert
The state of an item is a straight boolean value with no history. A TOGGLE message flips the state, ACTIVATE sets it to 1, DEACTIVATE sets it to zero.

The important bit is that there's no history, so your last statement is wrong (that TOGGLE should put everything back); what it does is flip all the states (so all the visible ones become invisible and vice versa).

I think that all explains what you are seeing - does it help?

Posted: Thu Jan 29, 2004 4:31 pm
by Gambit37
I wasn't clear, I meant that the last TOGGLE would toggle all the items back to their initial state.

This made me realise that my last toggle is wrong -- I shouldn't be touching the two intermediate objects with that last toggle! Doh!

Just a minor flaw in my logic.... ;)