Hey I need help I'm new

I just started the other day and need help with some things! I'm trying to figure out how to move the charecter to another room as they pick up a book like a teleporter and keep the book in the inventory


You seem to have posted this in both the Quest and Squiffy forums. Which engine are you using?

In Quest, this is relatively simple. You can set a script to run when an object is picked up.
There are four things you probably want to do. I'll include lines of code because they're easy to copy and paste. You can open the script in code view and paste the lines in; and then if you prefer GUI view you can see what they look like.

  1. Tell the player what's happened:
msg ("As soon as you pick up the book, there is a flash and you find yourself in a different place.")
  1. Put the book in the player's inventory:
AddToInventory (this)
  1. Teleport the player
MoveObject (game.pov, another room)
  1. (optional) If you only want this to happen the first time the book is picked up, change its take behaviour back to the default:
SetObjectFlagOn (this, "take")

In the code above I've used two special expressions; this is shorthand for "the object this script is attached to", so you don't need to worry about changing the script if you decide to change the book's name later; and game.pov means the object that the player is currently controlling (named "player" by default, but it's safer to use game.pov because that's always valid).

I've also mentioned another room, which you need to replace with the name of the room you want to teleport the player to.


So I didnt mean ti post of sqiffy just and accident trying to delete it ty though


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums