Relay and/or counter does not work

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.
Post Reply
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Relay and/or counter does not work

Post by Trakl »

I am really p****d by now, because I can't get this thing right.

The setup is as follows:

Two levers:

- one activating a trigger that swallows fireballs (action:swap local-->*poof*) with additional ACTION_COUNTER_INCREMENT

- second: activating ACTION_OBJECT_TOGGLE POrtcullis (that works fine)
+ activating Trigger OPBY Fireball re-activating a RELAY that asks the counter, if greater than 0 it activates a shooter and the counter (alternatively I tried an ACTION_COUNTER_DECREMENT, but that should be the same, shouldn't it?)

Result: Door opens, but no fireballs from the shooter.

The counter is set to do nothing but get in- or decreased.

Where is my problem?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Re: Relay and/or counter does not work

Post by Sophia »

Trakl wrote: - second: activating ACTION_OBJECT_TOGGLE POrtcullis (that works fine)
+ activating Trigger OPBY Fireball re-activating a RELAY that asks the counter, if greater than 0 it activates a shooter and the counter (alternatively I tried an ACTION_COUNTER_DECREMENT, but that should be the same, shouldn't it?)

Result: Door opens, but no fireballs from the shooter.
Your description is a little hard to follow, but it sounds like it's doing exactly what it's supposed to.

The second lever toggles the portcullis, and it activates a trigger that is opby a fireball. There is no fireball around, so the shooter isn't triggered. If you shoot a fireball, it'll get swapped away before anything can happen.

Of course, this may not be what you intended at all, but I don't really understand what you're trying to do.
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

The lever-activated relay should ask the counter how many fireballs you've pumped into the "force field" and triggers the shooter exactly that much.
the fireball-detector is there to re-trigger the relay after shooting. logically that should work. obviously, it is not, that's why I'm p****d ;-)
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Hi there - the first thing to check is the value of the counter. You can do this by putting a scroll in the dungeon with some text that's the value of the counter (then you can just look at the scroll to see what the value of the counter is).

You can see the "magic" bit of text you need to put into your scroll by looking at the wall text in the room with the bonzai in the advanced actions example dungeon that came with RTC.

When you've done this, you'll be able to tell if the counter really is non-zero (in which case the search for the source of the problem is narrowed down to the second lever) or if it's actually still zero (in which case, we should be looking at the fireball swallowing trigger).

BTW - your description sounds like it should work, so it shouldn't be too hard to fix the problem once we know where to look for it!
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

Thank you George for the hint. I now narrowed it down to the counter - it is always zero, if I wasn't mistaken with the scroll text. the counter is named "CAGE COUNT" and on the scroll I wrote "%VALUE:CAGE COUNT%".

The trigger activates two in one: the counter with ACTION_COUNTER_INC. and the SWAP_LOCAL to *poof* the fireball.
Since the fireballs *poof* there is no reason why the counter should not increase. The action is correctly connected with the counter, and the trigger with the action.

What is my mistake? I'm really confused. No, I didn't activate the ACTION_CONFUSE_EDITOR. :?
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Trakl wrote:if I wasn't mistaken with the scroll text. the counter is named "CAGE COUNT" and on the scroll I wrote "%VALUE:CAGE COUNT%".
I'm not sure what you mean by "CAGE COUNT" - is this the object type (i.e. you've cloned a WALLITEM_COUNTER and called it something like WALLITEM_COUNTER_CAGE_COUNT)?

What you actually have to do is to put the *item ID* of the specific counter (which will be something like ref012345-6) into the text - is that what you have already done though?
Trakl wrote:No, I didn't activate the ACTION_CONFUSE_EDITOR. :?
At least you havn't found ACTION_CRASH yet :wink:
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

Anyway, the counter is always zero. Shall I send you the source code of my dungeon?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Start the counter on a non-zero count to make sure you are reading it correctly - as GG said, you need to put the item id, not the object type, in. I am sure if you reference an incorrect value, the value out will always be zero
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

I did as he said. I checked it multiple times. The scroll always says 0.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Even when set to a non-zero value?
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Trakl wrote:the fireball-detector is there to re-trigger the relay after shooting. logically that should work.
Is it still active, though?

Then the fireball is being shot, and immediately swapped to nothing and then "put back in." The trigger cannot distinguish between "outgoing" and "incoming" fireballs.

Again, though, I may simply be misunderstanding your explanation.
Trakl
Journeyman
Posts: 75
Joined: Sun Feb 06, 2005 1:59 pm

Post by Trakl »

No it's two different triggers. One checks the outcoming fireballs and is only active when the trigger counting incoming fireballs is turned off.
Post Reply