Forum rules - please read before posting.

"wait engine" and nothing happens after

Hello,

I'm struggling with the "wait engine" function. Usually it works fine, but in this action list, the game doesn't go to the next action, it remains on the "wait engine". ( the game is not frozen but the actionlist doesn't go on). Any idea about what i did wrong ? Thanks !
NB : the action list runs in background

Comments

  • edited June 2018
    i tried to upload a screenshot of the action list but didn't succeed... what is the way ?
  • See the forum rules - images can't be hosted here, but can be uploaded to e.g. imgur.com and links posted here.

    Please also provide details of your AC/Unity versions and platform.
  • edited June 2018
    Hello,

    here's the link

    I'm using  AC 1.59a , and tried with unity 2017.2 , 2017.3, 2018.1
    The sequence stops on step 13 . It s still possible to play the game ( it s not frozen) but the step 14 doesn t come ( the menu doesn't turn off). If i delete step 13, everything is fine

  • 1. Is this an ActionList asset or scene-based?

    2. If you open up the ActionList Editor at runtime, it'll highlight the currently-running Action in blue.  Is #13 highlighted when the issue occurs?

    3. Check List active ActionLists in Game window? at the bottom of the Settings Manager.  What does it say at this time?

    4. If you delete #13 and replace it with an identical such Action, does it then work?  What if you set the Wait time to zero?
  • Hello Chris ,

    1. It s scene based

    2. the 13 is highlighted in green

    3. Current game state : normal  ActionLIst running : Enigme1 ( the one that should be running.

    4. Replacing with identical action does not work. If i set time to 0, it works. What is odd is that i'm using a wait action few steps later, and it works fine. If i pause the game and go back, it doesn't help. Maybe there s something about the trigerring of the action List ? The player is reading a book, and when he reaches the correct page ( identified by it s number), it launches the action list. This condition is set in the update method :  if (currentPage == 4 ) Enigme1.Interact();
    Could it be that the wait function  and the update method of the book script are getting in conflict ?

    Have a nice day !


  • I would need to know what that script contains to answer that.  Are you calling Interact() repeatedly?

    Try running the ActionList manually via the "Run now" button in the Inspector - instead of calling it through your script.  Does it work in that case?
  • well, it works fine with "run now"....
    I guess that the issue is linked to my script, so as it's not directly to AC, i would totally understand that you don't spend time into debugging it. The script is coming from a free asset, i just added some lines to get the page number of the book to launch the ActionList. Maybe putting in the Update method wasn't the best idea...

        public ActionList Enigme1;
        public ActionList Enigme2;
        public ActionList Enigme3;

        }
        void Update()
        {
            if (pageDragging&&interactable)
            {
                UpdateBook();
            }
            //Debug.Log("mouse local pos:" + transformPoint(Input.mousePosition));
            //Debug.Log("mouse  pos:" + Input.mousePosition);


            // lancement des ActionsList si on est à la bonne page
            if (currentPage == 4 ) Enigme1.Interact();
            if (currentPage == 6) Enigme2.Interact();
            if (currentPage == 10) Enigme3.Interact();


        }



  • Yes indeed - you shouldn't be calling an ActionList's Interact() method every frame.

    What you'd need to do is call it instead when currentPage is changed - or read the last-frame's currentPage value so that you can compare, e.g.:

    float lastCurrentPage;
    void Update ()
    {
      if (lastCurrentPage != currentPage)
      {
        // Page was changed this frame
        if (currentPage == 4) Enigme1.Interact();
      }
      lastCurrentPage = currentPage;
    }
  • Works like a charm... the pause issue is now solved. Thanks Chris !
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.