Quote
When you make the 2nd walk command blocking, then the sound shouldn't be played.
well- thats never happend, because my character never able to astablish this walk command- my AGS get stuck much before.
Quotethat did not help too. why? because after the wait(40) command, my character is steel behind the edge line, so the playsound command still repeatedly executed.
You also might want to add a Wait(40); after the PlaySound command.
my solution was to use Hotspot instead of room's edges.
i wasnt able to make it with edges though.
this is my final, working code:
function hHotspot1_WalkOn()
{
cEgo.Walk(-40, cEgo.y, eBlock, eAnywhere);
Display("after 10 minutes");
PlaySound(2);
Wait(100);
cEgo.Walk(40, cEgo.y, eBlock, eAnywhere);
}
if someone has a better solution, with edges, please notify me...