Doing multiple things that only work on one tile

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
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Doing multiple things that only work on one tile

Post by Trantor »

Hi everyone, I feel kind of stupid for asking this, but months away from dungeoneering seems to have eaten my brain cells. I want to do the following:

I cloned an item with a new attack method. This attack method is supposed to SWAP_TILE_LOCAL in order to close a pit if you stand directly in front of the pit. This all works fine, and if you are on the wrong tile, nothing happens, just as it should be.
Now, the problem is that I also want a text message to pop up once the pit is closed, and the cloned item shall vanish. I don't understand how I can do several things with one attack method, and most of all, how I can manage that everything only happens when I stand directly in front of the pit.
Can anyone please help?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I think you can create an interrum object out of the pit, and that object activates any other effects to a wallobject_action, expiring to a closed pit
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Do you want it to work on any old pit, or just one specific one?

I'm still getting to grips with complex actions in RTC so I'm not sure if what you want is possible.
User avatar
Parallax
DMwiki contributor
Posts: 424
Joined: Mon Aug 28, 2006 7:56 pm
Location: Back in New Jersey

Post by Parallax »

There may be easier ways to do this but, from my RTC days, here's what I think I would have done.

First, create a counter with COUNT = 2.

The attack method of your pit-closing weapon should simply activate a relay, let's call it R1. R1 is the beginning of a cascade and will be set to activate with a delay of 0.

R1 activates the counter and another relay R2. R2 is set to deactivate the counter with a delay of 1. R1 may still have more targets to do other things, as long as you want them to happen anytime you swing the weapon (putting an actual attack method here might not be a bad idea, depending on what your weapon is.)

Back to the pit. In front of the special pit, place a trigger, activated by party, constant weight, direction restricted to facing the pit. That trigger activates the counter with a delay of 0.

In layman's terms, standing in front of the pit, facing it, fulfills one condition. Activating the item anywhere in the dungeon fulfills the other. Only doing both at the same time will (briefly) get the counter down to 0. And what happens when the counter gets to 0, you ask? Here's what.

The counter is set to activate yet another relay R3, as well as a speech, and an action to destroy all instances of the weapon in the donjon (or just the one, if there's an action for that, I can't remember.) R3 deactivates the pit.

This is all basic RTC mechanics so, although it's been a while since I touched RTCEditor, it should all still work more or less in this way. There may be shortcuts to do the same thing a well.
User avatar
Gambit37
Should eat more pies
Posts: 13718
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Post by Gambit37 »

Nice logic, that certainly looks like it will work. :)

That's my problem, being more a visual person than a logical one, I often struggle to picture how mechanics should be built.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

I don't know if it was just a special pit though, was it? If not, swapping items is a good idea because the item needs to be infront for the result to happen, and nothing happens if there is no iinstance

If it is just one pit, then good solid mechanics!
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Post by ian_scho »

Gambit37 wrote:I often struggle to picture how mechanics should be built.
... and that's why my desk at work is filled with little pictures and drawings, before starting a task.
User avatar
Trantor
Duke of Banville
Posts: 2466
Joined: Wed Mar 09, 2005 4:16 am
Location: Berlin, Germany
Contact:

Post by Trantor »

Parallax wrote:There may be easier ways to do this but, from my RTC days, here's what I think I would have done.

First, create a counter with COUNT = 2.

The attack method of your pit-closing weapon should simply activate a relay, let's call it R1. R1 is the beginning of a cascade and will be set to activate with a delay of 0.

R1 activates the counter and another relay R2. R2 is set to deactivate the counter with a delay of 1. R1 may still have more targets to do other things, as long as you want them to happen anytime you swing the weapon (putting an actual attack method here might not be a bad idea, depending on what your weapon is.)

Back to the pit. In front of the special pit, place a trigger, activated by party, constant weight, direction restricted to facing the pit. That trigger activates the counter with a delay of 0.

In layman's terms, standing in front of the pit, facing it, fulfills one condition. Activating the item anywhere in the dungeon fulfills the other. Only doing both at the same time will (briefly) get the counter down to 0. And what happens when the counter gets to 0, you ask? Here's what.

The counter is set to activate yet another relay R3, as well as a speech, and an action to destroy all instances of the weapon in the donjon (or just the one, if there's an action for that, I can't remember.) R3 deactivates the pit.

This is all basic RTC mechanics so, although it's been a while since I touched RTCEditor, it should all still work more or less in this way. There may be shortcuts to do the same thing a well.
Thank you very much, I was actually thinking in that direction (I did unlockable spells in a similar manner), but somehow couldn't bring it together. I'll try that and/or other solutions you lot have suggested, thanks to everybody! Oh, and for the record, it was just one special pit.

EDIT: Just tried it, it works. Thanks! :D
Post Reply