Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Janik on Sat 24/09/2005 17:34:36

Title: Problem: Trapping the "Walk" interaction for a hotspot
Post by: Janik on Sat 24/09/2005 17:34:36
Here's the situation:

I have a hotspot for a door. The "Interact" event makes the player go inside the building. That's fine.

I want it to work so that clicking the "Walk" cursor on the door also makes the player go inside, without having to switch cursors. This just makes the interface nicer in my opinion. So, in the "Any Click" interaction I have:
if (game.used_mode == 0) //walk
{
  hotspot[5].RunInteraction(eModeInteract); //same as open
}


But, "Any Click" doesn't trigger for walk clicks according to the manual. What am I to do? Any help would be appreciated!
Title: Re: Problem: Trapping the "Walk" interaction for a hotspot
Post by: Babar on Sat 24/09/2005 18:19:05
Use regions instead of hotspots for the walk icon. Then, use the "walk onto region" event.
Title: Re: Problem: Trapping the "Walk" interaction for a hotspot
Post by: Pumaman on Sat 24/09/2005 18:23:30
Yes, using a region to detect that the character has walked there and change rooms is the best way.

Otherwise, you'd have to tick the "Don't automatically move character in Walk mode" box in the General Settings (which allows interactions to be run for walk mode), and then set up some script to move him the rest of the time.