Mouse over character

Started by Synthetique, Sat 26/07/2003 15:00:17

Previous topic - Next topic

Synthetique

hey ho,,

I want a character do disappear when the mouse is over him. How should i script it?

Ishmael

#1
if (GetCharacterAt(mouse.x,mouse.y)== x) {
 character[char].room=-1
} else if (GetCharacterAt(mouse.x,mouse.y)=! x) {
 character[char].room=currentroom
}

?
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
\( Ö)/ ¬(Ö ) | Ja minähän en keskellä kirkasta päivää lähden minnekään juoksentelemaan ilman housuja.

MachineElf

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.
There are 10 kinds of people in the world: Those who understand binary and those who don't.

Synthetique

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.

Synthetique

I dont need this anymore. But thanks anyway. I came up with a better idea. ;D

Pumaman

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.

SMF spam blocked by CleanTalk