Changing Game Attributes From A Script

Liam315
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
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
Thanks Thierry, got it working now. That raise UI request is a good thing to know about :)

Cheers,
Liam.

Thierry
Yes, it's very useful for this kind of features :wink:

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

Support

Forums