Random number in Quest 5

peter edwards
I would like to run a script at random times during a game. Can this be done?
Also, is there a way to move an object to the player's location, but not into his inventory?
Any advice would be welcome.

guzmere
Not sure about the random number, but to move an object to the players location you can use
Move [object] [ object] to [expression] [player.parent] this will move the object to the players location. Just replace word object with your own object, the second object I mean. Have fun. Terry :D :D :D :D

Pertex
peter edwards wrote:I would like to run a script at random times during a game. Can this be done?
Also, is there a way to move an object to the player's location, but not into his inventory?
Any advice would be welcome.


You can add a turnscript. This script is called after every input and you can call the random function there to check if the script should be executed or not.

peter edwards
Many thanks, Terry. Works perfectly! By the way, did you manage to fit the jewel into the socket?

Thanks also to you, Pertex, for your reply. Forgive my ignorance - I'm new to Quest - but I can't seem to find the random function. Am I missing something right in front of my eyes?!

guzmere
Crikey I forgot all about it! Nearly finished Dark Mirrors so will get back to it. Yes I did fit the jewel thanks. Terry :D :D :D :D

Pertex
no problem. Choose "set a variable or attribute" in the script adder in the gui. Then you can choose random number in the combobox

set variable [testvar] = [random number] between ....

peter edwards
Many thanks, Pertex. All well now!

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

Support

Forums