Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Alynn on Mon 24/11/2003 17:00:19

Title: if (GetCursorMode==WALK_MODE)
Post by: Alynn on Mon 24/11/2003 17:00:19
I have that line of code in a any click interaction on a hotspot.

I have a 2 floor room with a stairwell I made sure it worked on any interaction with the hotspot I then added the ifcheck to make it only fire on walk... BUT it does fire. It just walks to the nearest place on the first floor...

Is there anyway to counter this?
Title: Re:if (GetCursorMode==WALK_MODE)
Post by: Ishmael on Mon 24/11/2003 17:31:21
I remember reading something about a game.cursormode_used or similiar way to check the used mode... The any click interaction isnt fired by the walk mode, AFAIK, unless you use a custom walkto command, and have checked the "Dont automatically move character in walk mode" in the General settings...
Title: Re:if (GetCursorMode==WALK_MODE)
Post by: Alynn on Mon 24/11/2003 18:34:04
Ok, I checked Dont move character and added this into my on_mouse_click function unter the Left click

if (GetCursorMode()==0){
     MoveCharacterPath(0, mouse.x, mouse.y);
}

Now he walks where you click, and does those special things :)

Thanks TK (Can't believe I didnt see that option before)