Knowing when the player is over a hotspot.

Started by Sslaxx, Sat 24/04/2010 22:54:50

Previous topic - Next topic

Sslaxx

I'm not sure if this is as simple as it sounds, but.

As the topic pretty much says - is there a way of knowing when the player character (sprite) is standing on (colliding with) a hotspot?

Thanks.
Stuart "Sslaxx" Moore.

Dualnames

I was available in 2.72, but I think it's now kind of obsolete. How about using a region instead?
Worked on Strangeland, Primordia, Hob's Barrow, The Cat Lady, Mage's Initiation, Until I Have You, Downfall, Hunie Pop, and every game in the Wadjet Eye Games catalogue (porting)

Sslaxx

#2
Quote from: Dualnames on Sat 24/04/2010 23:24:44
I was available in 2.72, but I think it's now kind of obsolete. How about using a region instead?
Never even crossed my mind. Thanks! The only thing that comes to mind as would be nice is if there was a "hovering over the region" feature ala hotspots.
Stuart "Sslaxx" Moore.

discordance

You could also use

Code: ags

if (Hotspot.GetAtXY(player.x,player.y) == hHotspot1)


or whatever the name of the hotspot in question is.

Sslaxx

#4
Quote from: discordance on Sun 25/04/2010 22:17:29
You could also use

Code: ags

if (Hotspot.GetAtXY(player.x,player.y) == hHotspot1)


or whatever the name of the hotspot in question is.
Didn't get that impression from the help file, but I'll give that a shot too, thanks! Oh yeah, it's GetAtScreenXY.
Stuart "Sslaxx" Moore.

discordance

whoops, sorry :) I tend to rely way too much on autocomplete.

SMF spam blocked by CleanTalk