Change the object name depending on what portion of the object the mouse is on?

Started by poc301, Fri 28/01/2011 17:03:10

Previous topic - Next topic

poc301

Hello everyone,

I ran into a bit of a problem I am hoping to get some help with. 

In one of the rooms I have a door (hotspot) set into the back wall.  Directly in front of this door (perspective wise) is a glass window.  The glass has transparency effects, so it makes the toons behind it look like they're behind glass.  I like the effect :)

Anyway, the glass takes up the entire area in front of the door, and when I try to use the door, it doesn't work.  It is because the window is blocking it.

So I wrote some quick code to allow me to use / look at / etc the door so long as the mouse.x and mouse.y coordinates are withing the confines of the door behind the glass when the mouse is clicked.  This works great.  The problem is that because the glass object has no name, nothing appears on the taskbar when it is moused-over.  All other objects/hotspots in the room do.

Does anyone know of a command I can use to make "Door" appear on the mouseover section if the mouse coords are within a certain range?  I assume the repeatedly execute portion is where I want it, I just don't know what to use.

The other option I guess is to make another door object, transparent, and put it in front of the glass... 

I am using AGS 2.72 by the way.  Never upgraded, but will when this game is done.  It's been 2+ years in the making :)

Thanks,

Bill




Ryan Timothy B

I haven't used 2.72 in a very long time and I used it quite briefly, but doesn't it have Object.Clickable? Just make the window non clickable and that's all you need to do.

poc301

Wow, thank you so much!  Hahah.  I was concentrating so hard on finding a way to change the name based on mouse coords, I didn't even think of a way to make it non-interactable. :)

2.72 does have object.clickable, and it works wonderfully.

Thanks!

Bill

SMF spam blocked by CleanTalk