Some n00b script questions

Started by oluisheavy, Tue 09/01/2024 18:23:51

Previous topic - Next topic

oluisheavy

Hey guys, im trying to make my first game using tumbleweed verbs because im making a game based Uninvited from NES. I have a couple of questions because im trying to find on this forum but im kinda lost.

1 - I want to make a text message as a narration in the begining of the scene. So far im trying this, i wanna hide the GUI in the first rooms too but the script doesnt work.How can i make to room change after the messages were displayed.
Code: ags
function room_FirstLoad()
{
 
  DisplayAt("Crescer por aqui foi uma experiência marcante demais. Todas as viagens");
}


2 - I wanna set the game principal language as Portuguese, but i couldnt find the right way, even reading the manual. Ive tried this code but even with ; the AGS keeps saying need the ;.

3 - I wanna change some of the verbs, for example, tumbleweed has 9 verbs, but i wanna change to six: Look, Talk, Open, Hit, Pray, Close. I wanna know how can i do it, if there's some tutorial.

Srry for the newbie questions, thanks for the help.

Khris

#1
Please always show the exact code you tried and mention the exact error message you got. This really helps (and also allows to better gauge how much help you need).

1.
Code: ags
function room_FirstLoad()
{
  Verbs.HideGui();
  Display("Crescer por aqui foi uma experiência marcante demais. Todas as viagens");
  Display("...");
  Display("...");
  Verbs.ShowGui();
}

You tried only passing text to DisplayAt(), which also requires coordinates and a width, as the "At" part implies. Please always, always check the manual first. Simply click a script command in the editor to move the cursor there, then press F1 to show the explanation in the manual. (This even works for a ton of Tumbleweed commands, as I've just found out to my amazement :))

2.
In the script node, open Tumbleweed -> TemplateSettings -> Edit Script and find line 36. Change it to
Code: ags
  Verbs.VerbGuiOptions[eVerbGuiTemplateLanguage] = eLangPT;

3.
Further up in the same script you'll find a way to specify which verb button goes where. Simply move the buttons for the six verbs you need to the top positions (by assigning them to Controls 0, 1, 3, 4, 6 and 7), then edit the gMain GUI accordingly. (Keep the other three buttons(!), but move them outside the GUI by changing their Top property.)
To change the keyboard shortcuts, go to Tumbleweed -> VerbGui -> Edit Script, select Verbs::Localize from the dropdown at the top and scroll down to the Portuguese section. (Assign a char like "^" instead of a letter to "sort of" disable the keyboard shortcut.)

SMF spam blocked by CleanTalk