[Done for V0.38] Counter Reset = Toggle plz!?

Messages are moved here (should anyone ever want to see them again) once they are no longer applicable to the current version (e.g. suggestions that have been implemented or bugs that have been fixed).

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
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

[Done for V0.38] Counter Reset = Toggle plz!?

Post by L!ghthouse »

This is actually a continuation of a post from 3 years ago...
http://www.dungeon-master.com/forum/vie ... et+counter

I would like to see the Toggle command changed for Counters. When you use the toggle command on a counter, it would reset the counter to 0.

Activate = Counter+1
Deactivate = Counter-1
Toggle = Reset Counter to 0

I am creating a shop using RTC. I have approached this from several angles and have descided that the only way to make a shop work 100% is to be able to reset counters to 0. (I could go into specifics of why, but It would take a while to explain)

Could we please have this added to the next version of RTC? PLEASE!?
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post by Pedro »

Toggling of counters is already used in certain situations and changing its behaviour would destroy backward compatibility.

However the counter reset would be a very useful idea but not in this way.

Pedro
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post by L!ghthouse »

Pedro,
Certain situations? I'm not sure what you mean. I thought that Toggling and Activating both did the same thing for counters (Counter+1)? Can you explain plz?
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post by Pedro »

Look at the counter (21,24,5) on standard DM map and connected with it 4 switches. This is a good example.

Another example:
You have one door and two triggers on floor.
Door can be opened only when two triggers get a proper item (e.g. stone).
If you remove the item from one of triggers then door will be closed again.

Toggling of counter is the only method to reach such effect I know.
Guest

Post by Guest »

@Pedro - Thanks for the clarification.

Still, there needs to be a way to be able to reset the counter back to 0. Any suggestions?
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post by L!ghthouse »

oops, forgot to login, lol
:lol:
User avatar
Pedro
Journeyman
Posts: 69
Joined: Sun Nov 14, 2004 11:48 pm
Location: Poland

Post by Pedro »

Your counter can activate a relay and then relay will deactivate this counter as many times as you want (maximum 8 times, but you can use more relays if necessary).
So, if you have, for example, a counter with count=4, you can set for such relay 4*dectivate the counter. This kind of "reset" can be executed only when counter reaches its value. I have no idea how to reset it if count<>value. It's probably impossible.
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post by L!ghthouse »

The problem is that I need to be able to reset the counter back to "0" no matter what the current count is. Deactivate works for other problems, but not for this one.
User avatar
L!ghthouse
Craftsman
Posts: 106
Joined: Mon Nov 10, 2003 9:43 pm
Location: Budapest, Hungary

Post by L!ghthouse »

How about using the "Release" command as a Counter Reset. If you use the Release command on a counter, the counter resets to "0"...?
User avatar
Paul Stevens
CSBwin Guru
Posts: 4322
Joined: Sun Apr 08, 2001 6:00 pm
Location: Madison, Wisconsin, USA

Post by Paul Stevens »

In CSBuild/CSBwin (using the original DM/CSB actuators)
a person could do this by setting a couple AND/OR gates
to temporarily reroute the COUNTER output to:

Code: Select all

if non-zero then send decrement message to myself
else remove the temporary re-routing.
I don't know if RTC supports such things.

So it will decrement itself until it is zero and then
put things back to normal.
Of course a DSA would do it so easily that it would be
silly to go to so much trouble.
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

*bumpinator*
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Of course this would be unneeded if we had a counter query...

And wouldn't THAT be useful! :D

Anyway, the method Paul S outlined can be duplicated fairly well using RTC mechanics using a second counter, pad and a fireball launcher. :P
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Post by George Gilbert »

Done for V0.38

What I've actually implemented is three new actions COUNTER_SET, COUNTER_INCREMENT and COUNTER_DECREMENT which allow you to set, increment or decrement the value of counters by the value contained in their strength parameter.
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

Ooooooooooooooooooooooooooooh! *bounce*
User avatar
linflas
My other avatar is gay
Posts: 2445
Joined: Tue Nov 04, 2003 9:58 pm
Location: Lille, France
Contact:

Post by linflas »

Halleluyah ! Easy Shops ! Easy shops !
User avatar
Sophia
Concise and Honest
Posts: 4307
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Post by Sophia »

Wait, you mean my way wasn't easy? :shock: ;)
Post Reply