Hi
I'm not sure if below is appropriate script but i need to have the user to use WALK mode only on hotspot for walkable area restored and the player to move to destination.
So far the player will not walk to destination.
function hHotspot2_Mode8()
{
if (mouse.Mode == eModeWalkto)
{
RestoreWalkableArea(3);
csinbad1.Walk(106, 109, eBlock, eWalkableAreas);
}
}
There may be other ways I can use but I would like to sort this out first.
all help appreciated
steptoe
Have you tried GetHotspotAtXY (with mouse.x/mouse.y as the coordinates to check and hHotspot2 as the hotspot you are looking for)? This way it will trigger whenever the mouse is over the proper hotspot, and then you can add some qualifying logic like (mouse.IsButtonDown(eMouseLeft)) to check for a click and then execute the blocked walk to that location.
You may consider making a non-block instead in case someone accidentally clicks there and changes their mind.
Good idea ProgZmax, I'll try it..
cheers
I can't make heads or tails of the first post...
One thing I see though is that the code says hHotspot2_Mode8(), so unless you renamed the function, mouse.Mode will never be eModeWalkto when that function is called (because it is Mode8).
Also, Walkto-Clicks on hotspots only trigger the AnyClick event, afaik.