rotate a teleporter by using a switch

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.
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

rotate a teleporter by using a switch

Post by Lai »

...
how does this works?
i want that 4 times using the switch the teleporter rotate about 360°
i tried:
-the switch toggle a relay. the releay does none,targets the teleporter, rotate south (alter triggered actions target location)
nothing happens while using the switch.
-the switch activatet a relay. the relay does none,targtes the teleporter,rotate south (alter triggered actions target location)
nothing happens.
-the switch toggle/activate the relay.the relay activate/toggles the teleporter,rotate south
the teleporter goes on/off
-a wallitem action_rotate_tile_east (action cant give a target, so i copy it from wall into tile where the teleporter are in order to hope this means
that this tile now be target)
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

Use 4 teleporters and a counter. Then just toggle the right one on/off.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

oh, i hoped it goes some easier way..
edit:
which way i have to set counter/teleporter?
this way?:
each teleporter have his own, 2 counter
one active next teleporter, the other deactivate the last
count:1

same thing with second teleporter, but counts:2
then 3, then 4?
the switch targets all 8 counter

the teleporter rotate one: south,other north, east,west
Last edited by Lai on Mon Oct 12, 2009 5:56 pm, edited 2 times in total.
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

It's RTC... it's never, ever, EVER easy. :P

EDIT: The ACTION_ROTATE_TILE option mentioned above would probably work...
To create a local effect (ie: ROTATE_TILE):
clone a FUL_BOMB and give it a "lifetime" value of -1 (-1 means instant expire), you can trigger a relay using this object as the "trigger" (look in the example dungeons)... just use a shooter to spit one out, it instantly detonates, triggering your effect (ROTATE_TILE_CLOCKWISE in this case).
Last edited by Lord_BoNes on Mon Oct 12, 2009 6:00 pm, edited 1 time in total.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

i have edit my answer...does im right or have i build it other way?
im just neophyte to handle the editor :shock:
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

I edited my above post.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

first time, i would like to understand the "counter" way...
the way i told are totaly crap, cause its much more complicated it looks like first look.
all teleporter inactive, first counter counts 1 for tele A,second 2 for tele B,third 3 for tele C,fourth 4 for tele D

-----------------------------------i thought first:
clicks----------set---------------teleporter
at switch:-----counter:---------activate
0--------------- ./.---------------./.
1--------------- 1-----------------A
2--------------- 2-----------------B
3----------------3-----------------C
4----------------4-----------------D
...

but it works this way:

-----1---2---3---4----set count
0--- A---B---C---D---activatet teleporter=X (and deactivate the other, which should not work=x)
1---X
2---x---X
3---x--------X
4---x---x--------X
------------------------(the fourth click have to reset all timers to build a loop, otherwiser:)
5---x
6---x---x---x
7---x------------------(at this click the counter 3=teleporter C have to be activatet,but doesnt)
8---x---x--------x
9---x--------x
10--x---x
11--x
12--x---x---x---x
...
#clicks

cause i realized this problem, i think it isnt possible to set this with counter without the possibility to reset them.
if there are a way to reset all counters,it is required for example making teleporter D working to deactivate with same timer 4 tele A and B.
or does i have still error in reasoning?

during the time im waiting for answer, i will take a look at your "full bomb" method, cause im interestet how it works...i have read several times
about this and want to understand how it works
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

What you do is trigger your counter...
Deactivate all 4 teleporters.
Trigger 4 relays that check the values of the counter (1-4).... ie: if "value of counter" = 1 then <turn teleporter A on>
Trigger a 5th relay that checks if the value of the counter is less than 1... this part might confuse, but I'll try.

When working with counters there is 1 rule, everything is backwards. Activating a counter lowers its value, while deactivating it increases the value. So what we want to do is create a loop that goes:
if "value" < 4 then deactivate counter, back to start.

So you have the 5th relay above, I'll call it RELAY_5 for reference:
Create a new relay (I'll call RELAY_6), set it to "deactivate" and set its target to the counter.
In RELAY_5's properties, set it to "activate" and set its targets to RELAY_6 AND to itself... make sure that it does itself last, the bottom of the target list.

Now, that the loop is set up, just run RELAY_5 BEFORE the first 4 relays to clamp its value from 1-4.

I hope this makes sense to you. Most people wouldn't get it.

EDIT: Just a side-topic, one of the first things I did with teleporters was to make a teleporter that sent you to a random exit out of 8 different return teleporters. It was actually quite a challenge, but it proved to be quite cool, especially when I ended up color-coding the exit teleporters.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

ok, i have to follow what u say step my step and repeat it with my own words..i hope youll not be nerved ;)

1)
i build 4 teleporter, all inactive, one for south,west,north,east.
2) i build my leaver who toggle the relays.
3) relay 1-4 this way:
Image

the things ive done at one pic
Image

relay #2= number2,relay3=3 ...
hmh...i think this first step i missunderstood...maybe the switch have to toggle the relay and counters too?
but if it this way, the switch have 4x counter + 4x releay= 8..and no space for relay 5 & 6...
or does the relay automaticaly counts the counter cause i target them into "value of item"
Duckman
Adept
Posts: 235
Joined: Sat Jun 17, 2006 11:39 am
Location: Finland

Re: rotate a teleporter by using a switch

Post by Duckman »

Are'nt these RTC, CSBbuild and DSB annoying? DMjava editor is always simple and straightforward, but these three other sometimes get incredibly annoying don't they. I agree, you have to do a counter and mess up with relays. Clone teleporters and make each direction have it's own clone, and make an action to turn all the types so your work will be much easier if you have to do an another such teleporter.
I don't post anymore for reasons real-life.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: rotate a teleporter by using a switch

Post by beowuuf »

DMJava has limited methods of building though. I believe when you started to get into the event menu, etc (or some of the more complex item switching mechanics) it got just as confusing.
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

im happy with this editor, but need to understand it better :)
especially how to work those two ways Lord_BoNes speak about cause to understand it would be very powerful for me to build more complex riddles.
to paste pics which shows the adjusts are helpful to dont missunderstand
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: rotate a teleporter by using a switch

Post by Gambit37 »

It's not annoying Duckman, it's programming. What you're doing when you build complex mechanics, is that you're actually writing a small program. If you have a programmers mind (like Lord_bones, Paul Stevens or Beowuuf), then these things seem easy -- but for those of us who work on a more visual level (like me for example), it's much much harder.

This is why I was never any good at Maths once it introduced letters of the alphabet. ;-)

Unfortunately, very few programmers seem able to describe things in an easy way to non-programmers. That's why you end up with geek teachers teaching geek students, and everyone else just drops out. :P
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

some things i realize while testing about many hours
all the following stuff was testet with invisbile blue hazes.their both activatet by the same "eye switch"

1. a relay cant be used if he just have "value of item: counter" (and the counter who are target by relay are activatet by switch) but dont be togglet or activatet from a switch.u have to trigger (=activate,toggle,...) the relay with a switch.
2. the value u want to connect with "parameter1" (eg: "value of item") have to place at "parameter2"
3. u cannot build more then 1 "leaver" or "big switch" at same place in order to all of them work. use switch "eye" and u could use more then one at the same place.they all triggered at same time every use
4. matters counter who would be activatet =-1 per trigger activate them:
counter:count:4, if u have conditioned your relay at a counter like "value of item"=counter, and want to trigger (activate) them at the point the counter`s value are 2 use "equal to " or "less_then_or_equal to"=3
notice that u have to set at relay parameter 2 the value like this:
a=value of counter
b=value of click(s) u want to trigger the relay
a-b+1=value u have to set parameter2 at relay----4-2+1=3
i dont know why its like this, cause i have thought a counter counts this way (if he setup=4 and be activatet)
4= no click
3=1click
2=2clicks
1=3clicks
0=4clicks and 0 the counter make what he have to do.


example A---------
counter`s count:4, relay "value of item:counter", both activate their own flooritem "blue haze"
example:
u want the relay to trigger at the second click=counter`s value=2
set the second parameter from relay: "equal to"/"less_then_or_equal_to" 3, "activate"
first click:nothing
second:the relay trigger his blue haze on
third:nothing
fourth:the counter triggers his blue haze on
5th:the counter trigger his blue haze off.
6:nothing
...
if u set the relay to "activate" like this, and he have done his job,nothing would happen even if you click 100x.the relay`s blue haze will be on.
its a difference way to work the counter does, cause the counter switch his blue haze off.

example B
but if u set the relay to "toggle" the things change:
1click:nothing
2:the relay trigger his haze blue on
3:the relay trigger his haze blue off
4:the counter trigger his blue haze on, the relay trigger his blue haze on
5:the counter trigger his blue haze off,the relay trigger his blue haze off
6:the relay trigger his blue haze on
7:" off
its important to know if the relay set to "trigger" it would start to work if the parameter2 value are scored,and then ignore the parameter 1+2 in order to toggle the target with each click.
i test i wasting counter to 5,relay to 4 and it works same way.

5.
if u build a complicate mechanic which have many counters and many relays, u have to use 2 "eye switches" triggering both his targets "activate"
or notice that if u set the switch who trigger the relays to "toggle", the things change like this (if u use all setings from example A)
1:nothing:
2:nothing
3:the relay trigger his blue haze on
4:the counter trigger his blue haze on
5:the counter trigger his blue haze off
...now nothing happens

6.
a (activatet= -1) counter are a one-way trigger if he dont loop.
i do not understand why it is that way,all things would be much easier if he reset hisself at count=0.
i miss to setup counters recharge too.
the next thing i dont understand are, why a counter set the item its targeting off at count:-1
(look at examle A + B)
at this time i havent check what happen if the counter be deactivatet=count+1...but i think its the same function

maybe this would help some who dont really understand relays/counters and connecting them together like me
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: rotate a teleporter by using a switch

Post by Trantor »

Gambit37 wrote:It's not annoying Duckman, it's programming. What you're doing when you build complex mechanics, is that you're actually writing a small program. If you have a programmers mind (like Lord_bones, Paul Stevens or Beowuuf), then these things seem easy -- but for those of us who work on a more visual level (like me for example), it's much much harder.

This is why I was never any good at Maths once it introduced letters of the alphabet. ;-)

Unfortunately, very few programmers seem able to describe things in an easy way to non-programmers. That's why you end up with geek teachers teaching geek students, and everyone else just drops out. :P
I feel like I SHOULD have a programmer's mind, since I studied mathematics and am very bad at anything that goes into a general artistic or crafting direction, and I still don't get half of the stuff that's being asked on these editing forums, not to mention the answers to the questions. So you can be a stupid idiot like me and still enjoy DM.
User avatar
Jan
Mighty Pirate
Posts: 2760
Joined: Tue Sep 23, 2008 4:55 pm
Location: Scumm Bar, Czech Republic

Re: rotate a teleporter by using a switch

Post by Jan »

But you're NOT a "stupid idiot", Trant!
Finally playing and immensely enjoying the awesome Thimbleweed Park-a-reno!
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Re: rotate a teleporter by using a switch

Post by Trantor »

Wait till you get to know me a bit longer... :wink:
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

my teleporter dont rotate yet :(

someone could explain exactly?
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

Sorry. My connection to the net was "unusable" for 3 days.

As for your answer. I'll include in my tutorial map that I've started. I'm breaking down some of MY advanced mechanics (as much as I can). I started it 3 days ago, and I already have:
- Reflective forceshield... sometimes bounces objects/spells back at you, sometimes makes spells explode, and it stops the party (functions like a door)
- Collapsing tunnel... a section of 8 squares that simulate a tunnel collapse (the roof can actually "cave in" blocking the passage, rocks fall, party gets hurt... etc.)
- Imp fireball... an example of the puzzle in DM2 (the one where the imp pushes the button for the fireball shooters)
- Damaging passage... an example of the "lightning tunnel" (to get the onyx key) in DM2
- Elevator... a stairwell that changes from up to down at the flick of a switch... the catch: it must cover an ever number of floors, and to lengthen the shaft... is just copy and paste

I'm sorry to make you wait, but it'd be FAR easier that attempting to explain it in text.
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

hmh...
does your tutorial ready?
i still need my lovely rotating teleporter
hehe
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

Sorry for the long delay on a reply, I didn't have anywhere's to upload the tutorial dungeon.... but here it is...
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

oh, thank u very much!
im very impressed how it works...
i dont realize that is so complicate

especially how the counter works in this build i do not understand cause it be only a target but targets nothing
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: rotate a teleporter by using a switch

Post by Lord_BoNes »

The counter is used to do exactly that, count... and nothing else. Whenever you activate a counter you lower its value by one, likewise, when you de-activate you increase its value by one.
So, whenever I click the button, I activate the counter... which drops the value by one. Then, I check to see if the counter has hit zero, if it has, loop through increasing its value, until it equals 4. I then, de-activate all four possible teleporters, and run through 4 relays to check the counter's current value, comparing it to 1,2,3 & 4 respectively, and activate the one that I want.

TA-DA! Problem SOLVED! :P
 
Image

1 death is a tragedy,
10,000,000 deaths is a statistic.
- Joseph Stalin

Check out my Return to Chaos dungeon launcher
And my Dungeon Master Clone
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

in order to add the mechanic lord bones upload for me i wonder, if there are no way to copy mechanics from editor#1 into editor#2
i couldnt paste the mechanic taken from #1 into my own build #2
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: rotate a teleporter by using a switch

Post by Gambit37 »

You need to copy the text from one text file to another -- you can't copy from one editor instance to another.
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

hmh..
this way wont work too, cause the item id are wrong?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: rotate a teleporter by using a switch

Post by Gambit37 »

You need to do a little manual editing too...

The point of having a text format for the dungeon was so people could easily share code examples and copy things from one dungeon to another. But you do need to do some manual editing after you copy/paste to make sure that IDs and coordinates are correct.
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

hmh
i dont understand which way i could see what i have to edit...
is this question answered at the editing wiki?
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: rotate a teleporter by using a switch

Post by Gambit37 »

You have a unique ID for every item in the dungeon. In the case of "Rotating Teleporter.txt" posted by Lord Bones, here's an example:

Code: Select all

000400-1	FLOORITEM_TRIGGER	4	0	0	OPBY=(PARTY)	ACTION=(ACTIVATE)	TARGET=(000202-1,000804-1)	OPTIONS=(DISABLE_SELF)
The unique ID ("000400-1") is followed by the item type ("FLOORITEM_TRIGGER") then by three coordinates of where it's placed in the dungeon (x,y,z or 4,0,0). Then you have a number of parameters for the item. You can see that some of the parameters are TARGETS -- and these target other items using their unique ID, eg, "TARGET=(000202-1,000804-1)"

So you need to firstly copy the whole block of code, then change all the left hand unique IDS (and probably their coordinates too). Then you need to change any of the right hand TARGETS to point to the new IDs of the items you changed.

Does this make more sense now?
Lai
Adept
Posts: 247
Joined: Sun Mar 02, 2008 1:24 pm
Location: cologne,germany
Contact:

Re: rotate a teleporter by using a switch

Post by Lai »

at my test only the dungeon build addet to my self-build dungeon, without any objects.
cause of this i do not understand, how to edit the id`s...or do i edit just the last of this three coordinates (which means the correct level)...i have to test it i think eg: 4 0 0 i have to edit in 4 0 6 cause its the 6th level
Post Reply