Teleport Items
Moderators: Bob the Hamster, marionline, SDHawk
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
Teleport Items
I've posted the same topic on Castle Paradox.
I'm working on an item for my game that will teleport the user back to the beginning of a dungeon. What I've done is a create an item that opens a text box. This text has a "use door" command that warps the player to a door I've created at the beginning of the dungeon.
However, during the game, whenever I use the item from my inventory menu (it's not usable during battle) it brings up a script error that says "Script Error!" "remove_menu: invalid slot -1" "Funny...no scripts running!"
If I hit ignore, it warps back to the beginning of the dungeon like it's supposed to. How do I prevent this error from occurring? Or is there another way to make this item?
To clarify, I'm trying to use it on the same map where it should warp to. I'm not trying to warp between maps.
I'm working on an item for my game that will teleport the user back to the beginning of a dungeon. What I've done is a create an item that opens a text box. This text has a "use door" command that warps the player to a door I've created at the beginning of the dungeon.
However, during the game, whenever I use the item from my inventory menu (it's not usable during battle) it brings up a script error that says "Script Error!" "remove_menu: invalid slot -1" "Funny...no scripts running!"
If I hit ignore, it warps back to the beginning of the dungeon like it's supposed to. How do I prevent this error from occurring? Or is there another way to make this item?
To clarify, I'm trying to use it on the same map where it should warp to. I'm not trying to warp between maps.
- Newbie Newtype
- Reigning Smash Champion
- Posts: 1873
- Joined: Mon Oct 15, 2007 9:44 pm
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
No, I'm not using any scripts.
Interestingly, I tried making an item that just displays a text box, not to warp any place. Basically it's a consumable item that displays a text box when used outside of battle. There are no conditionals, scripts, or choices on the box. I get the same error.
It seems it has nothing to do with the door command. Something about displaying a text box is hanging it up. Any ideas? Surely items are able to display text boxes, right?
Interestingly, I tried making an item that just displays a text box, not to warp any place. Basically it's a consumable item that displays a text box when used outside of battle. There are no conditionals, scripts, or choices on the box. I get the same error.
It seems it has nothing to do with the door command. Something about displaying a text box is hanging it up. Any ideas? Surely items are able to display text boxes, right?
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
I'm "using ypsiliform+2 200100208".
Okay, I went ahead and made a new game for the purpose of testing the bug. I made 1 map with 1 NPC (a tile that gives out this "test" item). I made 1 item called "test". It is consumable and displays a text box when used outside of battle. I start the game up, get the item, and use it. Everything works like it should.
Now I go back to my actual game and do the exact same thing, but it gives me the same error message I've been getting. I've checked in my "General Data" all the preferences bitsets are the same. I have no scripts. Both games are set to "display all warning message". If I choose to ignore the error message, the text displays fine. I'm stumped!
Okay, I went ahead and made a new game for the purpose of testing the bug. I made 1 map with 1 NPC (a tile that gives out this "test" item). I made 1 item called "test". It is consumable and displays a text box when used outside of battle. I start the game up, get the item, and use it. Everything works like it should.
Now I go back to my actual game and do the exact same thing, but it gives me the same error message I've been getting. I've checked in my "General Data" all the preferences bitsets are the same. I have no scripts. Both games are set to "display all warning message". If I choose to ignore the error message, the text displays fine. I'm stumped!
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
Sure. I just uploaded it to:
http://www.mediafire.com/?61x0o55f7fyo8s6
Or I can e-mail you a copy if you'd prefer. I've include game.exe so that you can run the game with the version I'm using.
Once you open coffin.rpg, start a new game. Right beside you should be a gray square door. Step on it an item called "test" will appear in your inventory. Use "test" and the error message will appear.
In OHRRPGCE "test" is item #48. The text box it references is text box #132. The NPC that gives you the item is NPC #69 on map 0. Tell if you need any other info.
And thanks so much for trying to help.
http://www.mediafire.com/?61x0o55f7fyo8s6
Or I can e-mail you a copy if you'd prefer. I've include game.exe so that you can run the game with the version I'm using.
Once you open coffin.rpg, start a new game. Right beside you should be a gray square door. Step on it an item called "test" will appear in your inventory. Use "test" and the error message will appear.
In OHRRPGCE "test" is item #48. The text box it references is text box #132. The NPC that gives you the item is NPC #69 on map 0. Tell if you need any other info.
And thanks so much for trying to help.
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact:
I figured it out.
When you use an item that triggers a text box, the menu that opened the inventory screen is closed. If the menu item that opened the inventory screen also had the "Close menu if selected" bitset turned on, then it would make a second attempt to close the menu after it was already closed.
The nightly build script had died a couple days ago, so I just restarted it. You can test with <a href="http://hamsterrepublic.com/ohrrpgce/ind ... n">current nightly builds</a>
When you use an item that triggers a text box, the menu that opened the inventory screen is closed. If the menu item that opened the inventory screen also had the "Close menu if selected" bitset turned on, then it would make a second attempt to close the menu after it was already closed.
The nightly build script had died a couple days ago, so I just restarted it. You can test with <a href="http://hamsterrepublic.com/ohrrpgce/ind ... n">current nightly builds</a>
- Willy Elektrix
- Liquid Metal Slime
- Posts: 910
- Joined: Sun Aug 15, 2010 11:30 pm
- Bob the Hamster
- Lord of the Slimes
- Posts: 7660
- Joined: Tue Oct 16, 2007 2:34 pm
- Location: Hamster Republic (Ontario Enclave)
- Contact: