I've tried searching for what i need here, and couldn't find it. So keep that in mind before i get flooded with hate for being incompetant/being a brony.
Anyways, i need a character to walk back and forth from one spot to another until a specific line in a dialogue is triggered. How would i go about doing something liek that?
Once the character stops, what happens after that? The reason I'm asking is to better determine whether you need a global variable.
Anyway, the most generic response I can provide based on the information given is this:
- Create a global variable, say called pacing (type bool, default true)
- Then, in the GlobalScript.asc:
function repeatedly_execute()
{
if (pacing)
{
if (!cPace.Moving)
{
if (cPace.x == 0) cPace.Walk(320, cPace.y, eNoBlock);
else cPace.Walk(0, cPace.y, eNoBlock);
}
}
}
You'd need to fill in the appropriate character script name, and coordinates, but it's actually pretty simple here.
- Finally, in the dialog script:
@3
// ..say some stuff..
pacing = false;
return
:o Wow that seems complicated. Alright then, standard dialog it is!
I don't mean to come across rude, but if that seems "complicated", then you're going to have a difficult time doing much of anything in AGS.
What i meant to say is that I'll use that and then insert it in the natural dialog! Or maybe have Pinkie Pie simply run her view during hte dialog. I'll think of something. Thanks for the help regardless!