Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bustee on Sat 22/09/2012 12:10:14

Title: Walking on a Hotspot (Solved)
Post by: bustee on Sat 22/09/2012 12:10:14
This is probably simple, but I cannot figure it out.

I'm using the Lucas Arts template and want to cover the whole floor in a room with different hotspots. The reason is that some of the hotspots are usable with items, but I don't want to give away these locations by being the only hotspots visible.

The problem is that the character now never moves anywhere, when I click goto and on the floor. I also don't want a fixed point as walk to, but the current cursor position.

Any ideas?
Title: Re: Walking on a Hotspot
Post by: Khris on Sat 22/09/2012 13:37:05
Add this to each of the hotspots:

Code (ags) Select

  (else) if (UsedAction(eMA_WalkTo)) {
    player.Walk(mouse.x, mouse.y);
  }
Title: Re: Walking on a Hotspot
Post by: bustee on Sat 22/09/2012 20:47:43
Thanks! Works like a charm

I couldn't find that command (probably because I thought it would start with eGA_ ). So I tried with mouse.Mode but that didn't help.

Is there a reason this has eMA as prefix and not eGA?

Title: Re: Walking on a Hotspot (Solved)
Post by: Khris on Sun 23/09/2012 17:15:42
Yes, it's a Meta action, as opposed to a GUI action.
All available actions are listed when you type "UsedAction(".