Re: 9 verb template - actions does nothing [SOLVED]

Started by drav3nat0r, Thu 24/10/2019 12:11:14

Previous topic - Next topic

drav3nat0r

Hi guys,

Total AGS noob here.  I want to create a game using the 9verb template.  I also downloaded the updated Tumbleweed template.  I run the example game that comes with it, and the actions work like the code says.  Then I edit the code that is sampled (change some wording in the dialogue) and the game runs with my amendmends.  Then I create a new room (room3), and I copy / paste the actions codes into my new room's script file.  Obviously I edit the code to point to my own hotspots in room 3, but the game does not want to perform any of the actions!  I even put the function room_AfterFadeIn() into my room 3 script with a simple "player.Say("This is a test") inside, but after the room fades in, nothing happens.  ANY help would be appreciated!  Am I missing something?  Thanks!

eri0o

What version of AGS are you using?

Are you using 9verbs template from where? You said you downloaded the Tumbleweed template, where did you got it?

drav3nat0r

I have the latest version of AGS (3.4.3.1).  I have tried with the built in 9 verb template, as well as the tumbleweed template.

eri0o

I noticed you are hitting this from the FAQ

QuoteQ. I am looking/interacting with an object but nothing happens, but I have it on the script file.

A. In the AGS Room Editor, under the object properties, in events, the field should be filled with the function to execute, wiring the room element to the script. If it's empty, clicking on the three dots button (...) the respective script will be open with the a new function for you to fill the details. If it has a value, clicking on the same button will direct you to it on the respective script file. This is true for all events, so for example a 'room_Load' script function won't trigger if it's not wired on the room events. It's usually easier to click on the three dots button of the event you want to develop in the Room Editor, which will generate the function on the script file for you to fill up.

On the events panel in the room editor, the event must be wired to the function. You can copy and paste the function name there or click the three dots to create a function or link to a function (if it's already in the script).

drav3nat0r

Thanks a lot hey. That fixed the issue for me. I didn't know you had to tell the engine to run the code, even though the code already tells the engine to, ugh, run the code  :-\

eri0o

Say you have 6 balls in a room and you want their interaction to be the same. You just link the same function for each ball object. And it's better all elements use the same abstractions (properties and events).

Crimson Wizard

#6
Quote from: drav3nat0r on Thu 24/10/2019 14:12:00I didn't know you had to tell the engine to run the code, even though the code already tells the engine to, ugh, run the code  :-\

In AGS there are several preset function names that run automatically according to some rule (such as "game_start" or "repeatedly_execute"), but many other events, notably room events and interactions with objects require to explicitly bind functions through events page.

Khris

Quote from: drav3nat0r on Thu 24/10/2019 14:12:00
Thanks a lot hey. That fixed the issue for me. I didn't know you had to tell the engine to run the code, even though the code already tells the engine to, ugh, run the code  :-\
:P
Good answer. Welcome to the forums.


SMF spam blocked by CleanTalk