Curious Artila Bubbles Posted August 25, 2004 Share Posted August 25, 2004 How do you you make trap doors take people places? I want the PC to go to the trap door which takes him(or her) to a tunnel to a stair way which leads to the surface. Do you need to use a special encounter or what? Thanks Link to comment Share on other sites More sharing options...
Articulate Vlish KMannKoopa Posted August 25, 2004 Share Posted August 25, 2004 That's exactly it. The special encounter does it, I used the following: beginstate 11; //Teleport to Basement if (get_flag(0,6) == 1) move_to_new_town(1,13,17); break; The flag is because it is a trap door that has to be open. Hope this helps. Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 25, 2004 Author Share Posted August 25, 2004 oh. crap. thanks for that. I'm a n00b to scripting and dont really understand it is there anything else important i should understand? and is it a terrain script? if so how do i use it? thanks Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted August 25, 2004 Share Posted August 25, 2004 You could make a custom trapdoor terrain and attach a trapdoor script to it with 3 memory cells for where the trapdoor would lead. But otherwise you could just use a normal spec enc. Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 25, 2004 Author Share Posted August 25, 2004 ummmm... see im a n00b and got no idea how to do that. is there some sort of number to give the script and could i use the script from the first post? Link to comment Share on other sites More sharing options...
Chittering Clawbug Linthar Posted August 25, 2004 Share Posted August 25, 2004 Taken from the first reply is this code. beginstate 11; //Teleport to Basement if (get_flag(0,6) == 1) move_to_new_town(1,13,17); break; Now let me explain it. beginstate 11; (each chunk of code in a scenario is usually part of a state. (The exceptions are the data scripts, but you don't have to worry about that.) The beginstate identifys that a new state has begun and the number is the number of the state.) I'll skip the if statment because that is not necessary for the most basic use. If you wanted the trap door to only be open some of the time then you would use an if statment. move_to_new_town(1,13,17); (This is the command that moves the party. The first number is the town number the party appears in. If you don't want the party to go to a different town, make the town number the same as the town number of where the trapdoor is. The second number is the x cooridinate where the party appears, and the third number is the y cooridinate where the party appears. If the x and y cooridinate parts doesn't make sense to you then you should go back and read the manual some more as their used in a good deal of calls.) break; (This ends the state. It must be at the end of every state thats defined or the script will not run.) Now your code would look like this with the state number and the 3 numbers inside the move_to_new_town adjusted for your own scenario. beginstate 11; move_to_new_town(1,13,17); break; Place it inside the townscript for the town the trapdoor is in, and in the editor, place a special encounter over the trapdoor with the same number as the state you used. (The special encounter button is the one the looks like a black dot.) If you don't know how to make a townscript again its covered in the manual. I hope that helps. PS: Also you may want to check out this link Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 25, 2004 Author Share Posted August 25, 2004 ah thank you very much! i understood that completely! EDIT: How do i attach the script, or more to the point, whats a special node? Is that the state thats called? Link to comment Share on other sites More sharing options...
Well-Actually War Trall Fort Posted August 25, 2004 Share Posted August 25, 2004 You have the code that you want to execute in a defined state in your town script, and you refer to that state by creating a special encounter rectangle in the editor. When you create an encounter with the button that looks like a big dot, a dialog should come up automatically to ask you for what state you want it to be linked to. And you set the town's script name in the Town Details box. Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 ok one more thing how do i find x and y coordinates? start counting from the center? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Ideally, you center the editor's screen around the spot that you want to know the coordinates of and then read them from the thing in the lower right-hand corner (just underneath the Drawing Mode). If you're looking at a square too far over to the side for you to center the screen on it, then count. You can count from the center of the screen or from the edges of the town (the first row on top is 0, and the first column on the left is 0). If you have a Mac, both Khoth's BetterEditor and Isaac's 3D editor have better ways of doing this, but if you have a PC, you're pretty much stuck with that. This was a much longer answer than necessary. *sigh* Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 it mighta been long but it helped thanks Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 ok. i put a special encounter on the trap door and gave it 11 as the state(special node, whatever). then i attached the script to the town that is supposed to have the player go to(it is written EXACTLY LIKE THIS): begintownscript; variables; body; beginstate 11; move_to_new_town=(2,16,24); break; when i walk on the trap door in the first town nothing happens. I also tried attaching the script to the town the trap door was in and that didnt work.HELP!!! Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Take the equals sign out of move_to_new_town. It should just read: move_to_new_town(2,16,24); not move_to_new_town=(2,16,24); Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 still didnt work. i tried it with the script in both towns. Which town is the script supposed to be in? Link to comment Share on other sites More sharing options...
Hatchling Cockatrice Lilith Posted August 26, 2004 Share Posted August 26, 2004 It's meant to go in the town the trapdoor is in. Did you get any errors when you tried stepping into the rectangle with the script on it? That might help us track down your problem. By the way, you, uh, did separate all those lines by line breaks in the actual script, I hope? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 Uhhhh... no error messages. what do you mean breaks? i put it all on one line. Is this one of those indentation things or something? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Line breaks. As in, returns. It should look like this: Code: begintownscript; variables; body; beginstate 11; move_to_new_town(2,16,24); break; This isn't mandatory -- as far as I know -- but it looks really, really ugly and confusing if you don't do it. Also, did you go to Town Details and actually name the town script that goes with the town? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 well i did that and i got an trapdoor1 error: state not found - 0 message. The name of my script is trapdoor1 Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Ah, right. It wants your town script to have the normal INIT_STATE. Try this: Code: begintownscript; variables; body; beginstate INIT_STATE;break;beginstate EXIT_STATE;break;beginstate START_STATE;break;beginstate 11; move_to_new_town(2,16,24); break; Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 it worked!!! thank you all!! Link to comment Share on other sites More sharing options...
Garrulous Glaahk bigblue Posted August 26, 2004 Share Posted August 26, 2004 Quote: Originally written by Bubbles:ok one more thing how do i find x and y coordinates? start counting from the center? you can also put an area description on the spot, the trapdoor shall be, to get the coordinates: use the button "room rectangle", i think, click two times on the field the trapdoor is in and look in the towns menue in area descriptions. there you can read the coordinates and delete the area description, cause you only needed it for getting the coordinates! Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 ok now, in the tunnel, i have the trap door ladder and stairs leading to the surface. 1. how do i put 2 of the state 11's in one townscript?how will the computer know I want the ladder going to the trap door and the stairs to the surface? 2.how do i make a party appear on the surface? the move to town wont work. Thanks in advance Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Ah, yes, this is slightly harder. Don't put two state 11's, first of all. Copy and paste and change the second state to state 12 if you want a second state that does basically the same thing as the first. From that point you can change the move_to_new_town call or whatever. However, there is no call to take the party directly outdoors, which appears to be what you're trying to do. As far as I know, the only way to go from town to outdoors is to walk outside the town boundaries. You can get around this in a couple of ways, the most obvious of which is to have the stairs lead to a cave exit town (basically just a very small cave with the town boundaries right outside), so that the party can walk out from there. In that case, you'd just have another move_to_new_town in state 12 taking the party to the correct location in the new town -- copy, paste, and all you have to do is change the arguments (the stuf inside the parentheses). Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 its just not working i have this script: begintownscript; variables; body; beginstate INIT_STATE; break; beginstate EXIT_STATE; break; beginstate START_STATE; break; beginstate 11; move_to_new_town(1,4,5); break; beginstate 12; move_to_new_town(4,16,28) break; the state 11 moves me from the ladder to the trap door and 12 goes from the stairs to an outdoor town.It wont do anything. I used state 11 in another script. does that matter? Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 "An outdoor town" is an oxymoron. Are you trying to move to an outdoor section or a town? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 oh. i meant outdoor in the sense that its not underground like my tunnel. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Okay, so have you placed the special encounter rectangle and set it to state 12? Does town 4 exist? Do you get any error messages at any point? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 no error message and its set to twelve. town 4 exists. the trap door ladder wont work either, incedentally. Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Have you gone to Town Details and set the town script under Advanced Details? Is the town script in the same folder as the scenario's .bas file? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 yes Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 Uh, then I'm pretty baffled. All you should need to do is: Have a properly formatted scenario, scenario script, and folder (made automatically by the editor, so probably not the problem) Have a properly formatted town script in the same folder Have the appropriate state in that script (state 12, in this case) Put a blue special encounter rectangle on the appropriate spot in the terrain Tell BoA which script to use for the town in the Town Details menu item Save all the preceding items (save the scenario, text files, etc) Enter that scenario using the BoA app -- it may help to start over fresh if you've made a significant change since the last time you entered the scen Step on the spot with a PC At that point, the script state should run. I'm thinking the problem may be with the last step... is the terrain blocked in some way? Are your stairs on the proper level? Can you actually step on this space? Link to comment Share on other sites More sharing options...
Curious Artila Bubbles Posted August 26, 2004 Author Share Posted August 26, 2004 what do you mean 'stairs on the proper level'? i can walk over them Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted August 26, 2004 Share Posted August 26, 2004 I meant at the right height. If you can walk on them, then they're fine. I really have no idea why they're not working at this point. If you've followed all those steps, then it should work. Someone else may have an idea, though. Link to comment Share on other sites More sharing options...
Ineffable Wingbolt Dahak Posted August 27, 2004 Share Posted August 27, 2004 Bubbles, e-mail me the scenario at pat.s.j@att.net I'll run through the problems real quick and let you know what is wrong. Link to comment Share on other sites More sharing options...
Magnificent Ornk Donald Hebb Posted August 28, 2004 Share Posted August 28, 2004 Quote: Originally written by Bubbles:beginstate 12; move_to_new_town(4,16,28) break; There's your problem. Your move_to_new_town() call needs a semicolon. Link to comment Share on other sites More sharing options...
Recommended Posts