hey ho,,
I want a character do disappear when the mouse is over him. How should i script it?
if (GetCharacterAt(mouse.x,mouse.y)== x) {
character[char].room=-1
} else if (GetCharacterAt(mouse.x,mouse.y)=! x) {
character[char].room=currentroom
}
?
That won't work, as when the character has left the room, the mouse.x mouse.y won't be over the character which means it will just be stuck in sending the character in and out of the room.
If you just want him to disappear, however, the first part of the script would work. Just put it in the repeatedly_executed in your global script.
but then i have to point exactly on the pixel where he stands.
I want to make a SPECIFIC character disappear when the mouse is pointing at any of his visible pixels.
I dont need this anymore. But thanks anyway. I came up with a better idea. ;D
Quote from: Synthetique on Sat 26/07/2003 15:47:13
but then i have to point exactly on the pixel where he stands.
I want to make a SPECIFIC character disappear when the mouse is pointing at any of his visible pixels.
No, TK's script was correct.
if (GetCharacterAt(mouse.x,mouse.y) == CHARID) {
character[CHARID].room = -1;
}
will do what you want.