Clarification required of activation types

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Clarification required of activation types

Post 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.
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post 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?
User avatar
Gambit37
Should eat more pies
Posts: 13769
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post 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.... ;)
Post Reply