Ineffable Wingbolt aka Ravenwing Posted September 30, 2006 Share Posted September 30, 2006 I'm currently trying to make a sort of practice scenario, but I've run into a problem. It's nothing huge, just annoying. I've added a special item; a key, if it matters. It works fine and everything, but it doesn't show up on the special items list. Instead of "No Special Items" or whatever it says, it's just blank. I've checked and rechecked my scripting, but I've failed to find anything wrong with it. Any suggestions? Quote Link to comment Share on other sites More sharing options...
Burgeoning Battle Gamma The Real Dragon King Posted September 30, 2006 Share Posted September 30, 2006 It could help if you added the source code for the item in question. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted September 30, 2006 Author Share Posted September 30, 2006 Ah. Right. Here it is. Code: beginstate LOAD_SCEN_STATE; init_special_item(0,"Spare Key","This is a key found at the back of the house. Its markings don't indicate what it unlocks.");break; Quote Link to comment Share on other sites More sharing options...
Burgeoning Battle Gamma The Real Dragon King Posted September 30, 2006 Share Posted September 30, 2006 To quote from the Cookbook -- nice thing to have.. You do have the item code in file that starts somewhat like: beginscenarioscript; body; beginstate LOAD_SCEN_STATE; ... then all you need to do... Quote: Once you have defined your special item, your next task is to create an appropriate script which gives the party the special item in the appropriate situation. For example, you might want to give the party an item in response while talking with a non-player character (see "dialogue" below), or searching an object (see "special objects" below). No matter what type of script you use, however, you'll want to use the: change_spec_item(itemNum, howMany); command to give the party 'howMany' copies of special item number 'itemNum'. For example: change_spec_item(4, 1); will give the party special item number 4. To remove a special item, you can either call change_spec_item() with a negative 'howMany' value, or else use the: take_special_item(itemNum); command, which takes one special item number 'itemNum' from the party. Finally, you can check to see how many of a particular special item the party has by using the: has_special_item(itemNum) call, which returns the number of special item number 'itemNum' the party currently has. This means that you can do things like: if (has_special_item(4) > 0) { ... } to perform an action only if the party has at least one copy of special item number 4. Do hope this helps.... James Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted September 30, 2006 Author Share Posted September 30, 2006 Oh right. Just forgot to mention it. Here it is. Code: beginstate 12;//find spare key if (get_flag(0,2) == 1) end(); message_dialog("You find a key. Thinking it might be useful for something, you pick it up.",""); change_spec_item(0,1); set_flag(0,2,1);break; Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted September 30, 2006 Share Posted September 30, 2006 So when you try to unlock the door that this key opens, it actually unlocks, even though the item doesn't show up on the special items screen? Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted September 30, 2006 Author Share Posted September 30, 2006 Yeah, it works just fine. It just doesn't show up on the list. I mean… it's not really that big a deal; most people probably wouldn't notice it, but it bothers me. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted September 30, 2006 Share Posted September 30, 2006 Changing the special item number to 1 has no effect. Edit - reading slower increases my understanding...but not enough to be helpful. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted September 30, 2006 Share Posted September 30, 2006 How have you set the memory cells in the door? List the numbers. In other news, is Erik Westra's site down? I can't access it. Quote Link to comment Share on other sites More sharing options...
Hatchling Cockatrice ex post slarto Posted September 30, 2006 Share Posted September 30, 2006 Google has cached versions of his Cookbook as HTML and .DOC files. They leave out the pictures (were those tables?) though. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted September 30, 2006 Share Posted September 30, 2006 I'll email the .doc file to a host if that is necessary. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted September 30, 2006 Author Share Posted September 30, 2006 Quote: Originally written by Kelandon:How have you set the memory cells in the door? List the numbers. Hmm… strange. Not sure what I was thinking here, but I made the door and took away the script. I guess I was trying to prevent access completely if the player didn't have the key. So basically it's a wall that looks like a door, and if you have the key, it changes to an open door. Should I just make it a regular door? Probably should huh… Oh, BTW. I do have a copy of the cookbook, though I haven't looked at it much since I got it. Only recently got back to playing/designing BoA. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted September 30, 2006 Share Posted September 30, 2006 Um... I think I know what's going on. If you've been using the same save game file to test the item each time, make a new one. Granted, this would mean a bit of extra work to get back to wherever the item in question it, but it should make the key show up. This happened to me once or twice in testing my stuff... had to leave some testing shortcuts embedded in early versions so I could skip around a bit. Quote Link to comment Share on other sites More sharing options...
Easygoing Eyebeast Dintiradan Posted September 30, 2006 Share Posted September 30, 2006 I have a .pdf copy of the Cookbook, if that needed. Don't know what version it is, though. And if I got a dime for every time I changed a script but didn't change the .sav... -------------------- Chicago Checking on Elderly in Heat - Headline Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted September 30, 2006 Share Posted September 30, 2006 I suppose I might host all of Erik Westra's stuff, if it comes to that. E-mail me whatever you've got of the Cookbook. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Swimmin' Salmon Posted October 1, 2006 Share Posted October 1, 2006 Sent. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted October 1, 2006 Author Share Posted October 1, 2006 Quote: Originally written by Ephesos:Um... I think I know what's going on. If you've been using the same save game file to test the item each time, make a new one. Granted, this would mean a bit of extra work to get back to wherever the item in question it, but it should make the key show up. This happened to me once or twice in testing my stuff... had to leave some testing shortcuts embedded in early versions so I could skip around a bit. If you mean that I should have my test party exit the scenario when I change it, that's what I do already. It's just a practice scenario for me, so I just made it one town (a house, really) that's easily accessible. Then again, if that's not what you're talking about, make sure to let me know what a fool I am. Then, do continue to tell me what you mean. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Ephesos Posted October 1, 2006 Share Posted October 1, 2006 Quote: Originally written by Nemesis:If you mean that I should have my test party exit the scenario when I change it, that's what I do already. It's just a practice scenario for me, so I just made it one town (a house, really) that's easily accessible. Yeah, that's what I meant. If re-starting the scenario didn't do anything, then I don't know what's up... listen to everyone else. Quote Link to comment Share on other sites More sharing options...
Magnificent Ornk Kelandon Posted October 2, 2006 Share Posted October 2, 2006 Quote: Originally written by Nemesis:So basically it's a wall that looks like a door, and if you have the key, it changes to an open door. By what mechanism? A blue special rectangle? If so, post the code for that, also. Quote Link to comment Share on other sites More sharing options...
Ineffable Wingbolt aka Ravenwing Posted October 2, 2006 Author Share Posted October 2, 2006 Alright, I'll give you the scripts for finding the key again and for opening the door. Code: beginstate 11;//enter the door? (ln100) if (get_flag(0,1) == 1) end(); message_dialog("This door won't budge. After several tries, you realize that you may actually have to use a key for the door to be opened. How… unlike you.",""); if (has_special_item(0)) { message_dialog("You try the key you found behind the house. The door swings open on its own accord, as if by magic.",""); play_sound(58); flip_terrain(32,32); set_flag(0,1,1); }break;beginstate 12;//find spare key if (get_flag(0,2) == 1) end(); message_dialog("You find a key. Thinking it might be useful for something, you pick it up.",""); change_spec_item(0,1); set_flag(0,2,1);break; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.