Jump to content

My secret passage terrain script


Aran
 Share

Recommended Posts

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...

 

Code:
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...

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...