Floor damage

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.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Floor damage

Post by PaulH »

I am trying to set up some floor tiles that cause damage to the team unless the team is carrying a certain object. If they drop the object and walk on the tile again, it will still cause damage. So far I have:

- Placed the damage trigger on tile
- Placed a trigger on the tile which points to deactivate the damage, using a certain item and the option 'over'.

Now when testing the first time I walk on the tile with object, the team still receives damage, but none thereafter/ Further more, the damage remains deactivated even if I throw away said item. I can do this easily in CSBWin.

Is there anyway of achieving this effect?
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Floor damage

Post by beowuuf »

That's because you deactivated the damage tile when you stood on it the first time. I think what you need is a weight effect, triggered by the absence of the object, that activated the tile.

I think you can use a relay and I think you can make a not equal to'

I think

Maybe.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

I see why I stick with CSBWin lol.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

I have this really neat idea you see, and would have to copy the tile many times over a large area. Just have to nail down the mechanics.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

No need for a relay, just use a constant weight trigger. On the trigger, set your opby to be the item in question and the target of the trigger should be the damage tile. The type of activation shoud be DEACTIVATE. Your damage tile should be ON by default and the trigger should be on the same tile as the damager.

That's it.

I think.

From memory, untested.

Why does this work? Because CONSTANT WEIGHT is basically an inverse toggle effect.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

Can you get a constant weight option from an item you carry? I shall investigate!
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

Ah, found it! But doesn't work at all now :-( Just damage with or without item when step on pad.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

Set it to ON AND OVER, not just OVER -- OVER is for items that are thrown.
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

Changed it, but no luck - the constant weight options is the problem.

Well I think the problem is that the damage is dealt first. If the damage could be delayed it would work.
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Floor damage

Post by beowuuf »

tile order is important - switch before damager, i think...
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

YES! I got it working! Cheers guys, I made a silly error on one of my tests.

Yer gonna love this idea!
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

:D Can't wait!
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

The beauty of this technique is cool too -- because the trigger and damager are on the same tile, you can easily copy and paste anywhere -- RTC updates the targets for each new copy when all items are on the same tile :)
User avatar
PaulH
Ghastly gastropod
Posts: 3763
Joined: Wed Aug 07, 2002 10:27 pm
Location: Level 6

Re: Floor damage

Post by PaulH »

Aye, I was praying for that! Lol.
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Floor damage

Post by ian_scho »

PaulH wrote:I have this really neat idea you see, and would have to copy the tile many times over a large area. Just have to nail down the mechanics.
Don't forget RTC is a text file so, after making a backup, you can close the editor down and get in there with your copy/paste fingers :roll:
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

That would actually be a lot harder in this case, as you'd have to edit each reference to be unique and also edit the coordinates of the copies. Do it in the editor! :)
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Floor damage

Post by ian_scho »

If it was really big I'd use a macro... In DSB you'd use a function I suppose.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

It's effort vs. reward. If it takes 5 mins to write a macro, and 2 minutes to copy and paste in the editor, I know which I'd do :) Always use the simplest available option for the task in hand, that's my motto. :-)
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Floor damage

Post by beowuuf »

Well, you could use excel, and use the 'fill row' facility to generate all new references in order. If you copy and paste into notepad, no formatting issues :) That takes about the length of time to drag three dialogue boxes all the way down the page, then copyand paste!
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

You still need to manually type in the coordinates. Still quicker in the editor in this case!

You guys really do love making simple things more difficult! :)
User avatar
ian_scho
High Lord
Posts: 2806
Joined: Fri Apr 07, 2006 8:30 am
Location: Zaragoza, Spain

Re: Floor damage

Post by ian_scho »

Yes and No. I agree with you that something like that would be quicker in the editor up to a certain size... And I agree with you that the 'tools' approach may take longer...

But take my fnMonsterPumper function in DSB :) . Just pass it coordinates X1,Y1and X2,Y2 and where inside the grid you'd like the monsters to end up (X3,Y3) then DSB takes care of the rest. It's taken me a while to do, and the monsters still move too slowly for my liking, but if/when I publish the dungeon anyone can use the function and adapt it to their own work. Now THAT is why I don't mind taking my time with this stuff.

Paul's solution of a cell-by-cell basis isn't going to be so portable, yet ... Agh. He got it working in the end. Hurrah!
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

Gambit37 wrote:Still quicker in the editor in this case!
User avatar
Trego
Artisan
Posts: 174
Joined: Tue May 26, 2009 2:03 pm
Location: Brunei

Re: Floor damage

Post by Trego »

...And if I wanted each party member to have the item, ie the ones that don't have the item will get damaged and the ones that do don't get damaged, that be?

I get as far as...

Floor trigger (active) activated by each member, target 4 relays set to trigger on member equal to 1, 2, 3, 4. These relays target something? Either the damage tile set to minus damage or the damage tile set to damage.

I could use an action that causes Monster Damage to Health of a party member.
Or an action Heal character set that to minus

This distinguishes each one of the heroes in the party (if there are more than 1), but is there a way to check who has or does not have the item?
It's not a bug in the program, I've just gone and done something weird.
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

I don't think there's a relay condition for PARTY MEMBER CARRYING is there?

You can't easily do what you want. The check for the item can only be done by a trigger, so you need to intercept that somehow, then filter it out on a member by member basis...
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

Just had a quick look at relays. In the triggering condition you can match items that a member is wearing -- so you can do what you want assuming the item in question is wearable. If it's not wearable, you might be able to use the Object condition: Test OBJECT[NULL] EQUAL TO OBJECT [SEPECIFC SELECTION] -- no idea if that would work though.

You then need to add another relay as the target of this previous relay -- and the next one should match the member number of your choice. Then the target of this new relay is the action you want to perform on the specific party member.

This is all theoretical.....
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Floor damage

Post by Lord_BoNes »

Unless I am mistaken, you are pretty much going to need the item to be wearable, if you wanna do it on a "member-by-member" way. As a group, it would be easy as pie. You just need to use a trigger with constant weight to check for the item, you target a counter (with a default value of one). This counter will swith to zero when the item is present, so you use a relay to go: "is this counter = 1" then the party DOESN'T have the item, so then you activate your floor damager.

As I said above, doing it "member-by-member" needs a equippable item. Then you just use EACH_LIVING_MEMBER and check if the item is equipped (you just need to check if item is on the given slot, it will run the checks for each member, so only the one relay is needed to check) then you can use an "anti-healing" potion (a VI potion that gives -1 health instead of +1) to damage them. But, just remember that potions heal/damage as a percentage AND that the minumum percent healed/damaged is 10%, RTC caps it to this so that a level 1 VI potion is still always moderately effective.

I hope that this has made sense. It did to me, but I think I've "translated it out my brain" pretty well :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
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

*Cough*. Yep, I think that's exactly what I said, er meant. *whistles, then steps away from all technology and becomes a sheep farmer.*
User avatar
Lord_BoNes
Jack of all trades
Posts: 1064
Joined: Mon Dec 01, 2008 12:36 pm
Location: Ararat, Australia.

Re: Floor damage

Post by Lord_BoNes »

Gambit37 wrote:*Cough*. Yep, I think that's exactly what I said, er meant. *whistles, then steps away from all technology and becomes a sheep farmer.*
Bloody LOL! :P
I must say that even now, you continue to get me to laugh almost everytime you post... hehehe
 
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
User avatar
Gambit37
Should eat more pies
Posts: 13715
Joined: Wed May 31, 2000 1:57 pm
Location: Location, Location
Contact:

Re: Floor damage

Post by Gambit37 »

I have no idea what you mean? ^_^

Anyway, I think we bamboozled Traygoh with science; he hasn't been back!
User avatar
beowuuf
Archmastiff
Posts: 20687
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Re: Floor damage

Post by beowuuf »

You made sheep farming seem to attractive!
Post Reply