How do I move the player object after the player inputs any type of command?

How do I move the player object after the player inputs any type of command?
Thanks in advance.


If you have a command set up in the command section, highlight it. There will be a script section on the first tab at the bottom. Create a new script (+ button), and in the pop up window, scroll down and select Move Object. The object will be ‘player’, and you will have to select the room you’d like to move them to.


Okay, but what kind of command should be set up? How should I set it up?

This is my game so far. I just use wait for key press to do what I want. But that is not exactly what I want to do. I want the player to be able to look around at objects or to just type a z for wait or something, and then the player is moved to a different room.
https://textadventures.co.uk/games/view/nmttplgmnue4vmudzs4ovg/digestion-vore-game


I have to admit I'm a bit new to all this as well, and I am only familiar with the desktop version, so hopefully what I tell you will apply to the web version as well.

For example, if you want the player to type something like "look at teeth" to move to a different room, you would first open your 'teeth' object (create one if you don't have one), and in the first 'setup' tab, at the bottom, you will see a dropdown menu for "look at" object description. Here you can select Run Script... then hit the plus and follow my instructions from the last post. "Move object".

If you want to have something happen when 'wait' is typed, you would have to go to the little dropdown menu on the bottom left that says 'filter'. Here there is only one option: to view library content. Select this, and in the search bar at the top of this window, type 'wait'. Select the first entry. I had to toggle 'code view' or the '</>' button on and off to have access to the + button I needed to create a new script entry. But once I did, I was able to add an additional script to the 'wait' command, where I should be able to have it do any number of things.


Do you mean after a specific command, or after any command, or instead of any command?

If you put a command in the current room with the pattern #text#, it will be run next regardless of what the player types. You can create a command like this, and then move it into the room when needed.

If you want to let the player do one command and then move them, then you can use a turnscript; or simplify it by using SetTurnTimeout. You could use a script like this:

msg ("The teleporter powers up. You just have time to grab one thing before you leave.")
SetTurnTimeout (1) {
  msg ("As soon as you are finished, you see the room fading away and find yourself in the kitchen.")
  MoveObject (game.pov, kitchen)
}

Nevermind. I got it! Thank you!


Could you explain what your issue was and how you solved it so future Questers can find the answer as well?


I just needed the SetTimeTurnout thing.
On the online version of quest, it looks like the "after number 1 turns", or the "run script after number of turns."

This is the code I used.

SetTurnTimeout (1) {
  MoveObject (player, Mouth)
}

Log in to post a reply.

Support

Forums