easier way to do this?

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: easier way to do this?
Shock Trooper
Member # 4180
Profile #0
I need a wall that only crumbles when a particular "variant" of Move Mountains (available only on scroll and only from a particular NPC) is cast. Otherwise, if someone brings in a party that already knows Move Mountains (even though I recommend the scenario for starting parties only), one of my toughest puzzles becomes trivial.

The only way I've figured out to do this is to define a custom terrain that doesn't crumble at all, but just uses the crumbling wall icon. Then I would give my scroll a special ability, in addition to casting Move Mountains, that calls a script state, and have that state broadcast a message to the terrain script on my "fake" crumbling wall. When the terrain script receives the message, it checks to see if the party is near, and if so, changes the terrain where it is to rubble. (Note: I haven't tried that yet, but I can't see any reason it won't work. If anyone else does, feel free to inform me. :) )

Anyway, I'm just wondering if there's an easier way to accomplish this that I'm not thinking of. That sorta seems like a "duct tape and baling wire" implementation... :)

I suppose an alternative would be to make the party forcibly "unlearn" Move Mountains if they come in to the scenario knowing it, but that seems rather icky to me...

-spyderbytes

EDIT: My idea for implentation won't work, for two reasons. (1.) If an item has both an ability that calls a scenario state and one that casts a spell, the spell gets cast but the state isn't called (and yes, the spell is the last ability, as specified by the docs). (2.) give_ter_script_message() is apparently broken (see this thread).

Back to the drawing board, I guess... :(

[ Friday, April 16, 2004 20:07: Message edited by: spyderbytes ]

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00
Board Administrator
Member # 1
Profile Homepage #1
This seems real close to how I wanted the glowing green gates in VoDT to work. Item. Use it. Checks for nearby terrain that crumbles/opens/changes and alters it.

May take a little kludging to get it to also affect other terrain types you want to crumble (namely, checking for them one by one). I promised that the editor would be powerful, not elegant. :)

--------------------
Official Board Admin
spidweb@spiderwebsoftware.com
Posts: 960 | Registered: Tuesday, September 18 2001 07:00
Shock Trooper
Member # 4180
Profile #2
That's what I finally hit on... just "faking" the Move Mountains spell part of it when the scroll is used, on a case by case basis (for the few spots where Move Mountains would actually do any good).

And since I thought the give_ter_script_message() call was broken, I even did it the hard way... by checking in the scenario script if we're in town, finding out which town we're in, and then checking for cases where it could possibly have an effect. :eek: At least I can simplify that a bit now... :D

-spyderbytes

--------------------
-spyderbytes
Posts: 200 | Registered: Wednesday, March 31 2004 08:00