Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Akumayo on Mon 20/03/2006 18:55:46

Title: Problem with GetAtScreenXY (hotspot) (SOLVED)
Post by: Akumayo on Mon 20/03/2006 18:55:46
I have the following line of code in my repeatedly_excecute:


if (Hotspot.GetAtScreenXY(character.x, character.y) == hotspot[talktocheck_ak]) {


talktocheck_ak is a variable, I have already ensured that it is set to a number 1-29, so it doesn't violate the hotspot numbers.
The following error is generated for the above line of code:

Quote
'[' expected

What have I done wrong?

Thank you for your time - Akumayo
Title: Re: Problem with GetAtScreenXY (hotspot)
Post by: Ashen on Mon 20/03/2006 19:00:55
You need a character number for the coords, e.g. character[0].x, character[0].y, or to use the Script-o-name. If character is a pointer, you'll need to rename it, since it's a reserved keyword. (Although I think it'd have given a error when you declared it.)

Oh, and Happy Birthday ;D.
Title: Re: Problem with GetAtScreenXY (hotspot)
Post by: Akumayo on Mon 20/03/2006 19:03:37
Oh, oops, that was a stupid mistake, and I was looking at the hotspot part of it for solutions  :-[
It's supposed to be:  player.x, player.y

BTW, thanks!