My secret passage terrain script

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: My secret passage terrain script
Law Bringer
Member # 2984
Profile Homepage #0
Evidently, block_entry(0) only revokes an earlier block_entry(1) call. It does not, however, allow passage in cases where something else impedes the party.

Is there some other call that would make the following terrain script work? I really hate making a new terrain type just for a single simple passage...

beginterrainscript;
variables;
body;

beginstate INIT_STATE;
break;
beginstate START_STATE;
break;

beginstate BLOCK_MOVE_STATE;
print_str("There is a secret passage here.");
block_entry(0);
break;
Edit: Forget what I said, I just noticed that this wall set actually had secret passages.

Still, I'm curious whether something similar could be done through a terrain script...

[ Saturday, April 14, 2007 10:10: Message edited by: Dr. Johann Georg Faust ]

--------------------
Encyclopaedia ErmarianaForum ArchivesForum StatisticsRSS [Topic / Forum]
My BlogPolarisI eat novels for breakfast.
Polaris is dead, long live Polaris.
Look on my works, ye mighty, and despair.
Posts: 8752 | Registered: Wednesday, May 14 2003 07:00
Lifecrafter
Member # 6193
Profile Homepage #1
Nope. Say you wanted to make a secret passage tree terrain, which would only be passable if the player knew to look for it. The only way to pull this off is to make the passable tree terrain, then place an if() block_entry(1); special on each of the passable trees, so you can only pass them if you 'know' about them. The same applies to secret passage walls that you don't want to always be passable (Or I suppose you could use set_terrain, but that's just a pain)

Basically you can't make a blocked terrain passable, but you can make a passable terrain blocked.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
? Man, ? Amazing
Member # 5755
Profile #2
Why not use swap_terrain?? It seems set up perfectly for a situation like this, where some special knowledge suddenly makes passage an issue.

--------------------
quote:
Originally written by Kelandon:

Well, I'm at least pretty sure that Salmon is losing.


Posts: 4114 | Registered: Monday, April 25 2005 07:00
Lifecrafter
Member # 6193
Profile Homepage #3
You could, but you'd have to have it so the terrains are swapped again every time you enter town, and you'd have to manually set the x,y coordinates for every secret passage (Which I hate doing) This way you can just draw special rectangles right in the editor, and unless you run out of rectangles or something I think it's much easier.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00