A novice needs help!
Author | Topic: A novice needs help! |
---|---|
Infiltrator
Member # 2245
|
written Friday, July 9 2004 19:51
Profile
Homepage
HELP! I'm having a crack at scripting, however, it's not working the way I thought it should. Here's the deal. When the party steps on a certain spot at town, I want a message displayed. I placed a special node at a spot, and let it be 11. Then I typed the script for my town. begintownscript; variables; body; beginstate 10; message_dialog("Testing, on two three"); break; However, I get an error. State not found - 0 Huh? Didn't I just define the state in my script? -------------------- VIVE LA TAKERS! VIVE LA REBELLION! VIVE LA GHALDRING! Posts: 522 | Registered: Friday, November 15 2002 08:00 |
Apprentice
Member # 4258
|
written Friday, July 9 2004 20:45
Profile
quote:No, you defined state 10. There a few special states that you NEED to have defined in each town script. They are: When you first entered the town it looked for the INIT_STATE in your script (state 0), couldn't find it, and gave you an error. If you don't want anything special to happen on entrance, you can just leave that state empty, but it must be defined. [ Friday, July 09, 2004 21:02: Message edited by: Gorvin ] Posts: 28 | Registered: Wednesday, April 14 2004 07:00 |
Apprentice
Member # 4531
|
written Saturday, July 10 2004 17:05
Profile
Also, the message_dialog command requires two strings, even if the second one is blank. For example: message_dialog("Testing, on two three",""); note the second set of quotes which do notheing but are required for the game to show the dialog box properly. Posts: 32 | Registered: Saturday, June 12 2004 07:00 |
Infiltrator
Member # 2245
|
written Saturday, July 10 2004 22:00
Profile
Homepage
THANKS! It didn't show that in the example. -------------------- VIVE LA TAKERS! VIVE LA REBELLION! VIVE LA GHALDRING! Posts: 522 | Registered: Friday, November 15 2002 08:00 |
Apprentice
Member # 4729
|
written Friday, July 16 2004 05:45
Profile
NOTE: The secoind set of quotes are used for something - for a second paragraph, since every paragraph can only be [some number] (think it was 256) characters long. So you can do like this: message_dialog("blablablablablablablablablablablablablablablablablablablablablablablablablablabla Ooops I think thats almost 256 char. long I 'll continue on the other paragraph","I'm continuing to write nonsense..."); Posts: 7 | Registered: Friday, July 16 2004 07:00 |
Agent
Member # 4506
|
written Friday, July 16 2004 13:00
Profile
Homepage
quote:Each thing can only be for 250 symbols long. It's annoying, but we've got to stick with it. -------------------- "You dare Trifle with Avernum?" ~ Erika the Archmage -------------------- My Scenarios: Undead Valley : A small Undead problem, what could possibly go wrong? -------------------- Richard Black - PROOF of his existance (the Infernal one's website). -------------------- MY FORUM! Randomosity at it's highest! :) Posts: 1370 | Registered: Thursday, June 10 2004 07:00 |
Warrior
Member # 286
|
written Friday, July 16 2004 16:24
Profile
It's supposed to be 255, but I made a string 255 characters long and BoA complained at me. I shortened it to 254 and it was perfectly happy. Crazy stuff. -------------------- Z: "I just feel so insignificant." Psych: "You ARE. You're an ANT." --Antz Posts: 104 | Registered: Saturday, November 17 2001 08:00 |
Apprentice
Member # 4729
|
written Saturday, July 17 2004 01:08
Profile
This is because BoA counts the 0 Posts: 7 | Registered: Friday, July 16 2004 07:00 |
Warrior
Member # 286
|
written Saturday, July 17 2004 17:08
Profile
Yeah, I realised that soon after posting. :) 255 characters including the terminating null character, so effectively 254 characters. *grumbles at C strings* -------------------- Z: "I just feel so insignificant." Psych: "You ARE. You're an ANT." --Antz Posts: 104 | Registered: Saturday, November 17 2001 08:00 |