Oh, and here's the code:
Code: AGS
function oChair_Interact()
{
if (isegoseated == false)
{
cEgo.Walk(147, 123, eBlock, eWalkableAreas);
cEgo.LockView(25); //ego not visible and not clickable
oChair.SetView(24, 1); //ego in chair
cEgo.Walk(137, 125, eBlock, eWalkableAreas);
isegoseated = true;
}
else
{
cEgo.UnlockView(); //ego becomes visible and clickable
oChair.SetView(24, 0); //ego not in chair
isegoseated = false;
}
}
function hDontwalk_WalkOn() //walking on the hotspot that directs him towards the point in front of the chair
{
if (isegoseated == true)
{
cEgo.Walk(137, 125, eNoBlock, eWalkableAreas); //since ego is standing on the hotspot he will continuously walk towards this point
}
}