Hi
I have a character (cboar2) behind a rock and I don’t want the player to know it’s there before he finds it. But if you have the mouse over the rock the action label tells you it’s there.
What to do?
This is my code:
function room_RepExec()
{
bool found;
int x, y;
if(BoarOut==0)
{
cBoar2.Transparency=100;
}
else if(BoarOut==1)
{
cBoar2.Transparency=0;
}
if(!cBoar2.Moving){
while(!found){
x=Random(Room.Width);
y=Random(Room.Height);
if(Region.GetAtRoomXY(x,y)==region[2])found=true;
}
cBoar2.Walk(x, y, eNoBlock, eAnywhere);
}
}
What you could do is set the 'Clickable' property of the boar initially to false.
As soon as theplayer has found it you'd set it to true:
// ...
cBoar2.Clickable = true;
// ...
:D
Thanks!
That did the trick!