Page 1 of 1
Relay and/or counter does not work
Posted: Sun Aug 06, 2006 1:47 am
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?
Re: Relay and/or counter does not work
Posted: Sun Aug 06, 2006 2:43 am
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.
Posted: Sun Aug 06, 2006 3:15 am
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

Posted: Sun Aug 06, 2006 3:37 am
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!
Posted: Sun Aug 06, 2006 11:37 am
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.

Posted: Sun Aug 06, 2006 11:48 am
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

Posted: Sun Aug 06, 2006 11:53 am
by Trakl
Anyway, the counter is always zero. Shall I send you the source code of my dungeon?
Posted: Sun Aug 06, 2006 12:00 pm
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
Posted: Sun Aug 06, 2006 1:12 pm
by Trakl
I did as he said. I checked it multiple times. The scroll always says 0.
Posted: Sun Aug 06, 2006 1:36 pm
by beowuuf
Even when set to a non-zero value?
Posted: Sun Aug 06, 2006 6:22 pm
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.
Posted: Mon Aug 07, 2006 4:17 am
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.