Changing Game Attributes From A Script

Liam315
22 Apr 2013, 08:16
Hi, I'm working on my first game and was wondering if there was a way to change the attributes of the game itself during play.

Specifically, I want to remove the command bar while a string of text appears so the player can't do anything and restore it when it is done.

I can't seem to change the game attribute showcommandbar to false using the set object attribute script, as it doesn't seem to recognise game as an object. In another thread was a code along the lines of request (Hide, "Command") which didn't seem to work either, although that could be because I'm implementing it incorrectly.

Any help would be much appreciated, cheers.

Thierry
22 Apr 2013, 10:48
Hi Liam,

The code you mentionned should work, but here is an easier way to do what you want :

1) In Quest interface, click on "Filter" then "Show library elements"
2) Find "Initinterface" function and click on it
3) In the displayed code, you should easily find "Raise UI request" script (it appears several times)
4) Select one and copy it from here, then paste it where you want to hide the command bar. Select "hide" in the dropdown list and leave the rest blank.
5) When you want to restore the command bar, copy/paste the same script, but select "show" in the dropdown list.

Hope it will be helpful :wink:

Liam315
22 Apr 2013, 12:27
Thanks Thierry, got it working now. That raise UI request is a good thing to know about :)

Cheers,
Liam.

Thierry
22 Apr 2013, 12:35
Yes, it's very useful for this kind of features :wink: