Teleport Items

Make games! Discuss those games here.

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Teleport Items

Post by Willy Elektrix »

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.
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

To be clear, you're not using any scripts here, right? This sounds more like an engine error than anything you're doing wrong.
User avatar
Newbie Newtype
Reigning Smash Champion
Posts: 1873
Joined: Mon Oct 15, 2007 9:44 pm

Post by Newbie Newtype »

JSH was having similar problems the other day. I couldn't figure out what was wrong with his script and it seemed like an engine bug there too.
<TheGiz> oh hai doggy, oh no that's the straw that broke tjhe came baclsb
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

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?
User avatar
Mogri
Super Slime
Posts: 4669
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Yes, it's an engine error. Don't worry about it for now.

James will likely fix it when he catches wind of this thread.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

I am not able to reproduce this bug with the current nightly builds.

What version are you using? Ypsiliform stable? Or a nightly build?

Can somebody make a simple test case that demonstrates this bug?
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

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!
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Strange.

Would you mind sending me a copy of your game?
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

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.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

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>
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

Awesome! Thanks so much for your help! I never would have found that. I wasn't aware that you could edit bitsets for menu items.

I'm not sure what I can do to repay you, but if you need help to play test a game or something I'll be happy to give you hand.

Thank again!
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7660
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

The fact that you are making and sharing a game is payment enough :)
Post Reply