Why doesn't this script work?
I'm trying to get the mouse to change to talk to when over a character.
This is in my repeatedly execute:
if (Character.GetAtScreenXY(mouse.x, mouse.y) == true){
mouse.SaveCursorUntilItLeaves();
mouse.Mode = eModeTalkto;
}
Read the manual (http://www.adventuregamestudio.co.uk/manual/Character.GetAtScreenXY.htm)
Quote from: Character.GetAtScreenXY
Returns the character if there is, or null if there is not. See the description of GetLocationName for more on screen co-ordinates.
The
== true part of that doesn't mean anything - replace it with
!= null and it should work. You may also want to add a
mouse.Mode != eModeTalkto check as well. Otherwise - as it's in
rep_ex - the
SaveCursorUntilItLeaves line will be repeated, 'saving' the mode as
eModeTalkto.
Thanks, I had used the != null in some other places, I just wasn't thinking clearly.
So far it's working as-is, except != null correction.