I am trying to make a command to make the character say things non-blocking and animate the talking view when the character is standing still. This is the script I have.
Function:
Code: ags
here I made a function that will have the character say something non-blocking then set the global int 200 to 1.
Repeatedly Execute:
Code: ags
Here I made it so if the global int 200 is set to one, the main character will talk when standing still.
The main character says the message non-blocking, but for some reason he will not talk when standing still.
Does anyone know why?
Function:
function Nonblocksay(String message){
cEgo.SayBackground(message);
SetGlobalInt(200, 1);
}
here I made a function that will have the character say something non-blocking then set the global int 200 to 1.
Repeatedly Execute:
function repeatedly_execute()
{
if(GetGlobalInt(200)==1){
if(cEgo.Moving == false){
cEgo.LockView(cEgo.SpeechView);
cEgo.Animate(cEgo.Loop, 4, eRepeat, eNoBlock);
}
else{
cEgo.UnlockView();
}
if(cEgo.Speaking == false){
cEgo.UnlockView();
SetGlobalInt(200, 0);
}
}
}
Here I made it so if the global int 200 is set to one, the main character will talk when standing still.
The main character says the message non-blocking, but for some reason he will not talk when standing still.
Does anyone know why?