Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Wed 14/04/2021 09:58:11

Title: How can I add a 'repeaedly execute' while talking to a character or dialog'ing?
Post by: bx83 on Wed 14/04/2021 09:58:11
I've tried in repeatedly_execute() and repeatedly_execute_always() - doesn't matter, it seems to go to a place that exists only in the dDialog. I have debugging in the global script under repexec(), it simply stops checking when it enters a dialog (dDialog.Start() )
I have something which detects the current speech frame a character you're talking to is on; I can't access the character.
Title: Re: How can I add a 'repeaedly execute' while talking to a character or dialog'ing?
Post by: Khris on Wed 14/04/2021 10:07:10
Maybe this?
General settings -> Dialog -> Run game loops while dialog options are displayed

Also, what exactly does "I can't access the character." mean?

And show your code please.
Title: Re: How can I add a 'repeaedly execute' while talking to a character or dialog'ing?
Post by: bx83 on Wed 14/04/2021 10:40:54
Have it turned on - doesn't work.

It's not so much the dialog options code - this is easily enough to get into. It's the code on the dDialog page - there is nowhere in here where I can do a repexec()

Extraneous but: is there any way to animate in a non-blocking way?
If I try eNoBlock for an animation, it doesn't run on-screen. If I proceed t with a blocking event or Wait(1), it *does* work -- but I'm trying to run code in a repeatedly_execute_always(), so it doesn't allow blocking code :/
Title: Re: How can I add a 'repeaedly execute' while talking to a character or dialog'ing?
Post by: Khris on Wed 14/04/2021 10:49:02
Code in repeatedly_execute_always a) runs in the background b) is executed 40 times per second, that's why it doesn't allow blocking commands.

What exactly are you trying to do, and how have you tried to implement it? SHOW YOUR CODE.

If you put an .Animate(..., eNoBlock) in the function, the animation starts over and over again, 40 times per second. It never leaves the first frame.