or not? (2pts?)
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu{
//in room script header
bool dogbark = false;
function repeatedly_execute_always()
{
if (dogbark == true)
cDog.SayBackground("bark bark"); // you need another SetTimer there if you want him to do that in a sequence with pauses
// or use the "BackgroundSpeech" module (forum search) if you want him (or any other character ever) to SayBackground
// something with speech animation and "wait"s in beetween
if (IsTimerExpired(t)) // it is important to do SetTimer(t,1) after the (dogbark = true;) for the following actions and can be set optionally in advance,
// if you want to let the character wait before he responds
{
cClerk.UnlockView(); // Always good to do that before NPC actions
if (dogbark == true) // if the dog barks
{
cClerk.Walk(x, y, eNoBlock, eWalkableAreas);
cClerk.AddWaypoint(x, y); // make sure the character stands on the exact spot you want ( AGS is sometimes a bit buggy and not exact there)
SetTimer(t, 200); // The timer for standing by the dog until he says or does something
start=0; //prevents a loop
}
if (cClerk.x == x)
{
cClerk.LockView(view);
cClerk.Animate(loop, delay, eOnce, eNoBlock);
SetTimer(t2, 400); // set this second timer to an amount your NPC needs to do all you want him to do until he walks back
}
}
if (IsTimerExpired(t2))
cClerk.Walk(startx,starty,eNoBlock,eWalkableAreas);
if (cClerk.y <= [the "i see you" limit]) // to let him catch you
{
whatever you want to do
}
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.045 seconds with 15 queries.