I noticed there's a WalkOn event for hotspots but there isn't a WalkOff one.
I want to give an object a certain tint while the player stands on hotspot and if the player walks off, I wont to remove the tint.
Of course I could use Regions for that, but there are only 15 Regions and that won't be enough, in fact even 30 Hotspots could also be problematic, as I'm using pretty big bgs. Maybe there's a possibiblity to increase the count?
maybe you could use something like...I don't know...if the character is on a specific x,y coordinate, tint the character and then remove the tint when he's standing on a different coordinate. Just a thought and have no idea if it would work. I'm not a great scripter :D
yeah, that would work - but the whole code would get really confusing - well at least thats a possibility. Maybe there's another way
What version are you using? In 3.2 there's a limit of 50 hotspots. Also, there's no "WalkOn" but only a "StandingOn" for hotspots.
But I'd do it like Mouth suggested, the script shouldn't get confusing doing this.
Edit: It should look somehow like this:
Pseudo-
if (Hotspot.GetAtScreenXY(player.x, player.y) == hHotspot1) oObject.tint();
else if (Hotspot.GetAtScreenXY(player.x, player.y) == hHotspot2) oObject.tint();
else if (Hotspot.GetAtScreenXY(player.x, player.y) == hHotspot3) oObject.tint();
...
else oObject.RemoveTint;
Hm thanks Matti - this way it looks really straightforward - I'll try this
You can use Matti's code in a function that is called by the WalkOn events. I believe hotspot 0 (hotspot less parts) also triggers the event. If not you can use the repeatedly execute event.