Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: SpudMuncher on Sun 15/02/2009 11:15:13

Title: [Solved] Walk to hotspot on interact problem
Post by: SpudMuncher on Sun 15/02/2009 11:15:13
Hi,

AGS automatically walks to a hotspot when it is interacted with.
This behavior is not present with objects or characters.
The problem is that I don't always want the player to walk to the hotspot,
but I can't figure out a way to bypass the default behavior.
Unfortunately player.StopMoving () has no effect as the the automatic behavior
blocks the script.   >:(

I've almost finished making a fully updated, improved, version of Stryker's discworld
interface template. I really like the feature of discworld 2, where by double clicking
on an exit, the walking animation is skipped, and the player goes immediately to that
room. I wanted to add this feature to my project. When I double-click an exit, it
blocks the script and walks to the hotspot before going through it, all because of this
default behavior.

Any help in bypassing this, or perhaps another way I could tackle the problem would
be greatly appreciated.
Thank you.  8)
Title: Re: Walk to hotspot on interact problem
Post by: Kain_V on Sun 15/02/2009 11:31:51
hi, I am new to AGS world but maybe i can help a little (if I understood your problem  :P).
If you want to make the character walk where an object or character is i think you must click on object's events and 'interact object' and then write something like "player.Walk(347,  662,  eBlock);"

Now if you want to disable automated walking, I think you can do that from the General Settings of AGS.
So, try this and post again!  ;D
I hope i could help....
Title: Re: Walk to hotspot on interact problem
Post by: SpudMuncher on Sun 15/02/2009 12:23:08
Thx for responding.

Unfortunately, the 'Automatically walk to hotspots in Look mode' option in General Settings only applies to
*looking* at a hotspot, but I need it not to automatically walk when I interact with the hotspot.
Also, 'Automatically move the player in walk mode' being switched off doesn't help, as the
'auto-walk' happens when an interaction with a hotspot occurs, not because the player is in walk mode.

It's strange that it only 'auto-walks' with hotspots, and nothing else. It almost feels like a bug, rather than
an intentional design.
Title: Re: Walk to hotspot on interact problem
Post by: jastorman on Sun 15/02/2009 12:35:20
Hi, I am also a newbie, so this answer may not be what you're looking for, but setting the "WalkToPoint" in the hotspot options to 0,0 seems to disable automatically walking to a hotspot.
Title: Re: Walk to hotspot on interact problem
Post by: Pumaman on Sun 15/02/2009 14:16:17
That's right, if you set the Walk-to point for the hotspot, the player character will automatically walk there when you interact with it.

If you don't want this behaviour, then don't set a walk-to point for the hotspot.
Title: Re: Walk to hotspot on interact problem
Post by: SpudMuncher on Wed 18/02/2009 07:00:38
Thx alot.
Such a simple solution.
Cool.