RELAYS
Moderator: George Gilbert
Forum rules
Please read the Forum rules and policies before posting.
Please read the Forum rules and policies before posting.
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
RELAYS
a while ago I was thinking on how to figure a way to create two conditional relays to talk to each other, just having one only didn't seem right. I fooled around with the idea for some time, didn't spend time to try it out. I found a way to have more than one condition. managed slap together a method to do it. has anyone else managed to get more than one conditional relay to another conditional relay????
to me this is something that can really boost RTCs abilities. to be able to check for more than one condition in a chain should help out dungeon designing. has someone already done this? I couldn't find any reference to it.
to me this is something that can really boost RTCs abilities. to be able to check for more than one condition in a chain should help out dungeon designing. has someone already done this? I couldn't find any reference to it.
keep your gor coin handy
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
not only can the relays target other conditional relays, but the relays can be turned off or on which gives the RTC dungeon just about unlimited power.
I wonder what else we can do with this engine?
I wonder what else we can do with this engine?
keep your gor coin handy
- Seriously Unserious
- Master Superior
- Posts: 1418
- Joined: Sun May 11, 2008 11:53 am
- Location: Wandering around aimlessly in Lynchgate Woods
- Contact:
Re: RELAYS
I've managed to use a combination of relays and counters to create an "exclusive or" (XOR) condition, as well as linked them in series to create an "and" condition. Having one unconditional relay activate multiple conditional relays creates an "or" condition.
So if you have, eg, 2 conditions, any combination of which can trigger the same action, you could use the "or" setup I just mentioned to have each relay activate the same unconditional relay, although will want to add a condition and counter to make sure it gets activated only once for each time that event starts, so if both conditions are met it still only has the action happen once.
If you have 2 conditions that both must be met, I'd link the conditional relays in a series, with the condition most likely to be false first so your dungeon is more efficient. After the 2nd conditional relay is activated it activates an unconditional relay that starts the event.
So if you have, eg, 2 conditions, any combination of which can trigger the same action, you could use the "or" setup I just mentioned to have each relay activate the same unconditional relay, although will want to add a condition and counter to make sure it gets activated only once for each time that event starts, so if both conditions are met it still only has the action happen once.
If you have 2 conditions that both must be met, I'd link the conditional relays in a series, with the condition most likely to be false first so your dungeon is more efficient. After the 2nd conditional relay is activated it activates an unconditional relay that starts the event.
Re: RELAYS
I see experts about the relay here.
Please write down a tuto to explain the relay.
What there is in the encyclopedia is junk. As et matter of fact, it tells no more than what RTCeditot displays
Please tell me how it works, what can be done and give me exemples
Please write down a tuto to explain the relay.
What there is in the encyclopedia is junk. As et matter of fact, it tells no more than what RTCeditot displays
Please tell me how it works, what can be done and give me exemples
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
yeah, that is one way, in this way there is no counters necessary, each condition must be met before going to the next, if it is not, a new action takes place say like a message, in between the relay can be turned off or on as well in the series. before we could not shut off a relay, but it is possible to do it.I've managed to use a combination of relays and counters to create an "exclusive or" (XOR) condition, as well as linked them in series to create an "and" condition. Having one unconditional relay activate multiple conditional relays creates an "or" condition.
what I have been doing before was create the same unique relay, it can check a counter or whatever, just like you were saying, but they could not check each other without looking at a counter, can't do that directly. in this case there is only one unique relay needed. each additional conditional relay can target each other. when you check out the new ai SU, you'll see what I am referring to. it rips opens a door to just about anything possible. we'll be seeing this in use in the future. being able to combine two conditional relays and more is interesting. this method really works well with the monster ai being built, can't wait to program with it. monsters will get their ai after all there is no complexity about it, it's rather easy once one does it a few times. let's get building. Clodius has to start on the Characters. he's been enjoying SOTF, i don't blame him, but when he is done i'll pester him to get to it i think by next winter we might have those characters done and put to use this method... it is what RTCs ai needed to grow, limitations have to be removed. without the ai there really is no need to do this, i did it because i needed to, i am not happy with limitations, boundaries must be stretched and broken. hard to work with block or straight thinking
keep your gor coin handy
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
i think SU can explain it far better than i can terkio, he's far more efficient at doing it, language is not my subject, neither is math. i am visual, i'll say hang a right at the two bigs trees in a cross in front of the red barn on top of the hill
keep your gor coin handy
- Seriously Unserious
- Master Superior
- Posts: 1418
- Joined: Sun May 11, 2008 11:53 am
- Location: Wandering around aimlessly in Lynchgate Woods
- Contact:
Re: RELAYS
The main thing for me that unlocked the power of the relay was studying discrete math at college, which included a section on logic. It's that study of how logic, in this case the 2-value logic of "true" or "false" that's needed. There is another type of logic that deals in percentages and stuff, but we don't need that for RTC so it can just be ignored, just worry about the true and false and now they work.terkio wrote:I see experts about the relay here.
Please write down a tuto to explain the relay.
What there is in the encyclopedia is junk. As et matter of fact, it tells no more than what RTCeditot displays
Please tell me how it works, what can be done and give me exemples
@Chaos: in my "or" example, the only reason for the counter is to prevent the action from being double activated, which can cause RTC to crazy with actions interrupting each other, RTC can freeze, or it cab even outright crash. So basically the counter is to answer the question "is the action already in progress?" If it is, then don't start it again, if it is not, then go ahead and start it.
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
yup, that's why the counter is needed, but in a series, there is no double accident activation, it can't happen. each relay offers an answer for true and an answer for false as well as hit the next condtional relay doing the same thing once more. the way it works is easy, no counters, no accidents, it really is limitless, but the only way to know is to test it, so get to it! yeah, i look forward to working with this in the dungeons coming.
keep your gor coin handy
- Seriously Unserious
- Master Superior
- Posts: 1418
- Joined: Sun May 11, 2008 11:53 am
- Location: Wandering around aimlessly in Lynchgate Woods
- Contact:
Re: RELAYS
That's right, you usually don't need a counter for an "and" condition as the relays are activated in sequence so if one fails they whole action fails. The only time you'd need a counter is if it stores a value you need for one of the relay's tests. Essentially, since you can't work with user defined variables in RTC, the counters are needed to fill that role. It's a good thing we have them as many constructs would be impossible without them.
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
that is right, but I got them to work without a counter, carrying it forward, you don't need one, but using one obviously makes it very powerful. we can connect equals to of course. I guess you'll have to try it out. have you tried connecting to conditional relays? only the first condition works, the rest do not have conditions, but now we can do that, we can connect them. there is no need for a counter, using them would put this over the top. anyhow try connecting two relays with conditions first, then you'll see what I mean. I could not do that directly, maybe there is something I am missing which is why this thread is an important one. I looked at GGs programming method and I did a copy, but it was slightly different but it works essentially the same.
keep your gor coin handy
- Seriously Unserious
- Master Superior
- Posts: 1418
- Joined: Sun May 11, 2008 11:53 am
- Location: Wandering around aimlessly in Lynchgate Woods
- Contact:
Re: RELAYS
Based on my understanding of the way relays work, combined with the way the logical "and" "or" and "xor" work, a counter would not be needed for the "and" condition, since all relays testing the various elements of the condition would need to activate in sequence, one after the other anyways, no counters needed, except if a counter is needed for any of the individual conditions, such as to test how many times a button was pushed, to determine if that condition was met. Like I said, counters are how you store variables in RTC, so whenever a variable is needed that's not directly attached to another object, you must use a counter.
The "or" condition cannot be done without a some method of testing if an earlier condition of the "or" relays has already been met and activated the event, the counter is the best way of doing this, each time a condition is met, the relay activates, increments a control counter and activates the event, which first tests against the control counter to see if the event has already activated. At the end, the control counter would need to be reset to 0 again if that event can occur more then once.
The "or" condition cannot be done without a some method of testing if an earlier condition of the "or" relays has already been met and activated the event, the counter is the best way of doing this, each time a condition is met, the relay activates, increments a control counter and activates the event, which first tests against the control counter to see if the event has already activated. At the end, the control counter would need to be reset to 0 again if that event can occur more then once.
- Chaos-Shaman
- High Lord
- Posts: 2642
- Joined: Wed May 03, 2006 7:26 pm
- Location: The Gates of Hell
Re: RELAYS
I think you are missing my point... yes, that's how operations work, that's how counters work. do try what I've said already, also try turning off and on a relay. the only way for you to understand what I am saying is to test it.... you'll see what I mean. then you can show me how you do it, I would appreciate that. for now though I know that two conditional relays do not work when targeting each other directly. if you can do that I'd be very happy to know it. this stuff is important to know. what I am doing needs no counter, and I have been pondering other ideas that might be possible, I'm just getting started.
keep your gor coin handy