Two quick questions
eradcliffe
15 Jan 2011, 17:36I've had Quest for less than a week and I love it. But I'm stuck on two issues.
1. I wanted to make a container (in this case a bottle) so that you could type in "empty bottle" and remove whatever object is in it without specifying the object. Is there a way to do that?
2. Is there a way to limit a container to holding just one object? Obviously if I have a bottle of water, I shouldn't be able to put a piece of cheese in the bottle along with it.
Thank you. (:
1. I wanted to make a container (in this case a bottle) so that you could type in "empty bottle" and remove whatever object is in it without specifying the object. Is there a way to do that?
2. Is there a way to limit a container to holding just one object? Obviously if I have a bottle of water, I shouldn't be able to put a piece of cheese in the bottle along with it.
Thank you. (:
Alex
18 Jan 2011, 19:401. You can write a loop script that will find each object inside your container - that is, each object that has a "parent" property of "bottle". In the loop script, unset the parent property. Here's an example to show you what I mean:
2. This isn't built-in behaviour in Quest 4, but you can set it up using scripts. On the Container tab in QDK you'll see you can have a custom script run whenever you try to add or remove an object to/from a container, so in this case we can just use a numeric variable to keep track of how many objects we've added, and manually add the object using a script only if there is enough space.
Here's an example:
2. This isn't built-in behaviour in Quest 4, but you can set it up using scripts. On the Container tab in QDK you'll see you can have a custom script run whenever you try to add or remove an object to/from a container, so in this case we can just use a numeric variable to keep track of how many objects we've added, and manually add the object using a script only if there is enough space.
Here's an example:
eradcliffe
19 Jan 2011, 20:42Thank you very much! I actually started using a flag "bottle is full" for when I wanted to limit objects in a container, but this looks easier to deal with.
I forgot to mention this earlier, but every time I start up the game editor, I get the same error twice: "Error 457 - This key is already associated with an element of this cooleton in Utility.GetFontsList."
And if I don't click "Ok" on the first one, I get another error: "Error 91 - Object variable or With block variable not set in frmMain.tmrAutosave_Timer" It only appears if I wait.
I'm not good with some aspects of computers, so I have no idea what these errors mean, but the game editor seems to work fine.
I forgot to mention this earlier, but every time I start up the game editor, I get the same error twice: "Error 457 - This key is already associated with an element of this cooleton in Utility.GetFontsList."
And if I don't click "Ok" on the first one, I get another error: "Error 91 - Object variable or With block variable not set in frmMain.tmrAutosave_Timer" It only appears if I wait.
I'm not good with some aspects of computers, so I have no idea what these errors mean, but the game editor seems to work fine.