Object marked as visible but not visible when game starts

Started by paolo, Sun 05/03/2006 16:44:33

Previous topic - Next topic

paolo

I've just downloaded AGS and I'm working through the tutorial.

I've got three rooms so far and two of them each contain one object.  One of them is the key for which there is already a sprite, and the other is my own graphic of a wallet.

When I run the game, the key is not visible in the first room while the wallet is visible in the other room.

Here are the settings for the key:

1 object in the room
Editing object 0
Object is initially visible is ON
Image is number 2 in the sprite manager (the little key)
The baseline is set just below the key

and here are the settings for the wallet in the other room:

1 object in the room
Editing object 0
Object is initially visible is ON
Image is number 6 is the sprite manager (my own graphic)
The baseline is set just below the wallet

The settings are the same, so how come when I run the game I can see and interact with the wallet but I can't see the key?  Is there something else I might have set by mistake?  Does it have something to do with the items having the same number (I think objects are numbered from 0 in each room rather than globally)? I've tried deleting the key and recreating it and moving the baseline up and down, but it makes no difference. :-\

Thanks for any help.

DoorKnobHandle

You have done everything correctly with the objects if I am not mistaken. But did you check that you didn't set any walk-behind areas? Objects are going to be drawn behind the walk-behind area as well!

paolo

Ahhh, that makes sense.  Yes, that's what I've done.  Thank you very much!

I can move the object somewhere else, which won't cause any problems, but is there any way I can make the object "always on top" or something like that?

monkey0506

Look up Object.IgnoreWalkbehinds.

I'm not sure if there's a setting to do it in the editor, but you can use that to set it from the script.

Khris

If you've set the baselines of the walkbehind and key "correctly", then the key should be visible without setting it to ignore walkbehinds. So I assume you did something wrong when painting the walkbehind or setting its baseline.

Here's an example pic:


Blue is the walkbehind, the yellow line represents the baseline of the key. As long as it's below the walkbehind's, the key is visible.

SMF spam blocked by CleanTalk