Make 'open' not open... (web version)

Hi all,

I'm using the web version of Quest. Is there a way of making the 'open' command run a script instead of automatically opening something?

For example, I might want the player to see a treasure chest, but 'open' actually starts a sequence where a sea monster arrives on he scene, rather than rewarding them with the treasure as they had hoped.


If you're setting up your own custom command for 'open' then yes, this is pretty straight forward.

After you've added the command pattern in the first field at the top, just go down and choose 'Run a script.


Thanks Jud. How do I set up a custom command though? I don't want to change 'open' for all objects, just a particular one.


Right click on the room which contains the object (from the tree in the left pane) and choose 'Add command'. That will set your custom 'open' command to just that room. You may be able to narrow it down even further by right-clicking on the object itself and choosing 'Add command' but I don't know if this will work as the player can't actually be in the object so the game might not 'see' your command if it's on the object.


Thanks for that... I'll give it a go. However, am I right in saying that will change open for ALL the objects in that room?


It shouldn't do, because your command pattern will be specific to the object.

Let's say the object is named black box - your command pattern would be something like:

open black box; open box; open the black box

Unless you have another object in that room with box in the title the command should only apply to the one object.

However this is very hacky (I use custom commands for everything, but that's down to laziness and my inability to grasp the default functions of Quest).

One of the members who knows this software better will be able to tell you the proper way to do this.


'open' is a built-in functionality, meaning it's already programmed fully in, and thus there's no choice for setting it to be a 'script' Attribute (as it's likely a Function, not an Attribute), as this would thus require you to code in your own altered version of the entire 'opening/closing' system functionality.

I think the better option, would be to create your own specific/local Verb/Script Attribute, handle what you need to for that specific usage, than in altering (and probably losing) the built-in 'open' Script/Function and its functionality, and/or getting additional issues as it's global and/or you didn't program in handling for it.


actually... doesn't the 'opening/closing' have an 'on open/on close' Script option for handling/doing a Script for when you open/close that something ???


hege:
'open' is a built-in functionality, meaning it's already programmed fully in, and thus there's no choice for setting it to be a 'script' Attribute [...]

That's not strictly true. Yes Quest already has scripts for handling open/close, but your own commands can over-ride it.

I use commands for 'open' all the time.


You cannot use "open" as a verb, because it is already there as a command. However, you can override command with a new one.

However, if you set the object to be Openable/Closable, you can add scripts to it on that tab that will fire instead of the built-in open and close scripts.


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

Support

Forums