Object on top of hotspot (SOLVED)

Started by SiraRaven, Mon 13/07/2009 20:22:22

Previous topic - Next topic

SiraRaven

I've searched around a bit but couldn't find the answer to this problem anywhere.  I have a building for which both the building itself and the door are hotspots.  The player picks up a piece of paper elsewhere in the room and, upon using the paper with the door, the paper's supposed to be removed from the player's inventory and appear on the door.  Almost all of it works just fine - the problem is, I can't see the paper when it reappears.  It works if I make the paper reappear anywhere in the room that isn't over a hotspot, and if I put it halfway under a hotspot, I can see half of the paper, so it seems like the hotspots are covering up the object.  How do I fix this?

GarageGothic

Isn't the problem walkbehinds rather than hotspots? Hotspots themselves shouldn't cover object sprites. Make sure that the Baseline property for the paper object is set to a higher y-coordinate (meaning lower on the screen) than any walkbehinds that could cover it.

SiraRaven

#2
Ah - that was it.  Thanks!  Is there any way, though, that I can make it so the player can go behind the building as well as have the paper go on the door?

GarageGothic

Yes, it's perfectly possible, but depending on the building layout, you may have to split up the walkbehind in multiple areas for it to work. For instance, make the door a separate walkbehind and set the Baseline of the object to the bottom coordinate of the door. Then make the rest of the building another walkbehind and set it's baseline to whatever you want. As long as the character stays above that baseline he should be drawn behind the building.

SiraRaven

Ah - thanks so much!  It actually worked with just one hotspot - I just hadn't set the object's baseline to anything, so I set it to the bottom of the building/door, and it works perfectly.  Thanks again!

SMF spam blocked by CleanTalk