Forum rules - please read before posting.

Listen to user input constantly

Hello,
I am currently developing a Point and Click game, and for many reasons, I decided to switch from AGS to Adventure Creator. I am very strugling with how custom script works with AC.
I would like to find the equivalent of the repeatedly_execute() function in AGS, which basically listen to user input at every frame (you can have one by scene and one globally).
Example : when an object is at one specific position, I would like that any click user elsewhere changes that object position. I think I vaguely know how to code it but I have no idea where to put the script. When I create a C# script in my assets, I am not able to drag and drop it to the Hierarchy tab. Should I create a specific object ?
I am sorry, I am a bit lost here !

Thank you in advance :)

Comments

  • Weclome to the community, @BerlinClub.

    In Unity's C# MonoBehaviour scripts, the "Update" function is called once per frame. You should find this prepared for you when creating a new C# script in the Project window.

    To have a script present in the scene, you must have it attached to a GameObject. Create a new Empty in the Hierarchy, and drag your script onto it's Inspector.

    Bear in mind that these aren't topics specific or unique to AC - these are Unity concepts. I would recommend going through some of Unity's "Getting started" tutorials if you're new to Unity.

    On the AC side of things, however, it is possible to define "Active Inputs", which are input buttons that trigger ActionLists when pressed - so effectively the same thing but without code. You can learn more about them in the Manual's "Active Inputs" chapter.

  • Thank you very much @ChrisIceBox , I will try that !

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.