Add words to Tumbleweed verb tree after examining object

Started by Moley, Tue 03/06/2025 14:19:45

Previous topic - Next topic

Moley

Hi there,
very much a beginner. Is there a way to have words missing from the avalible verbs, that then appears after the player interacts with a certain object?

For example, if the character looks at a button, that would then inspire then to PUSH the button, thus that word then gets added to the verb options, but is not avalible before looking at the button.

Khris

Edit:
I'm now sure I misunderstood the question. Removed my initial answer.

So do you mean like disabling certain verbs altogether until the player learns how to push stuff for instance...?
To make a button invisible at the start of the game, open GlobalScript.asc from the Scripts node and go to the game_start function. Now put this command inside the function:
Code: ags
// called when the game starts, before the first room is loaded
// =======================================================================================
function game_start() 
{
  SetRestartPoint();
  btnVerb7.Visible = false;  // add this line
}

To show the button again, just set it back to "true".
To find out which button you need to address, open GUIs -> gMain and click on the button once. This will show its script name at the top of the properties pane.

(IIRC, translating your game to another language might actually change the button that is used for "Push", but this should do for now.)

Moley


SMF spam blocked by CleanTalk