I7- moving the player

hi, i know this sounds like an easy problem, but im still having a major issue with it. im simply trying to have the PC and a following NPC enter a location, then a cut-scene of sorts occurs with a paused screen, then after space-bar is hit, i want to move both the PC and NPC to a whole new location (not connected at all to the old location). but its totally not working. what happens is the new location’s description occurs with a prompt, but then instantly, the OLD location’s description is printed with a prompt and thats where the game is; in the old room. what the heck am i doing wrong? i could show u the source code, but it really is just as simple as it should be. could it be something wrong with the new location? any initial thoughts or should i definitely show u the source? thanks to anyone with any advice on this! (newbie here)

I think you should show us the relevant part of your source code anyway, because I’m pretty mystified.

hi. ok, here’s the code:

carry out going to Old Room for the first time: say "blah blah blah"; pause the game; clear the screen; say "blah blah blah"; pause the game; move player to New Room; move NPC to New Room.

it seems simple enough to me, and i cant figure out anything in the New Room’s code that could be interfering. HALP!

Have you tried turning on the Rules testing command to see if you can track down what rule is being triggered to move the characters back to Old Room?

Robert Rothman

hey, thanks. again, newbie here, so i appreciate the advice. i will try that out.

The problem is that you’re using a carry out rule and it doesn’t stop the game from running the standard carry out rules, including the ones that print the room description. You can fix this by changing it to an Instead rule. (In general, you want to use a carry out rule when you want something to happen in addition to what would normally happen. When you want to prevent the normal action completely and have the game do something else, use an instead rule.)

hey thanks. there was a reason i was using Carry Out, but currently i cant remember what that reason was. some previous bug i encountered. but yeah, i will def play around with an Instead rule and see what i can do. :nerd:

The report going rules run after the carry out going rules, so what happens is that the player and NPC are moved to New Room and the report rules for going to Old Room run, describing the Old Room (since that’s were you were going).

Make that offending carry out going rule an after going rule; after rules stop an action, so the report rules will not get a chance to run.

awesome, that makes perfect sense, too. god, i love this forum, u guys rawk! :stuck_out_tongue:

If you want your rule to fire only when going to Old Room was successful, you can use an After rule rather than an Instead rule.

thanks, yes, i took Felix’s advice about that and it seems to be working fine now, allowing me to continue my work on the numerous other bugs i have to sort out, lol.