0 Favourites

Strange problem working on Scripted cutscene event queueing

  • I've been trying to put together a bit of code so that when the player talks to a character, I'll call a "CharacterSpeech" function for each line of dialogue that appears. As in :

    CharacterSpeech("Here's the first line of dialogue");

    CharacterSpeech("And Here's the Second");

    To facilitate this, as well as having a system I can build off of for other cutscene-style animations (making characters walk around, change animations, etc.) I built a rudimentary event queueing system you can see in the image here, relying on having each event added to the queue waiting for a signal generated by the completion of the previous queued event.

    However, while the queueing seems to work fine, it seems to be doing something odd to the parameter passed to the CharacterSpeech function, namely the text to display. The function parameter (expliticly, the value of "Function.Param(0)" in the code) becomes 0 no matter what is actually passed to it, text, number, whatever, and I have no idea why.

    Now I've fiddled with this a bit, Setting the text isn't the problem, nor the queue position counters or anything. But Strangely, if I disable the first "Wait for Signal" in the function, then while not exactly working, the parameter is passed correctly. It only seems to be while waiting for the first signal that it's affected, and I have no idea why this should be.

    Can anyone help with this?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)