Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   actionmouseover (https://forums.graalonline.com/forums/showthread.php?t=36619)

Spark910 08-25-2002 10:28 PM

actionmouseover
 
actionmouseover

Is then the mouse is anywhere over the NPC object, but only works when you state the X,Y of the NPC and use setshape/setshape2

EG:

NPC Code:

if (created) {
x=32;
y=32;
setshape 0,16,16;
}
if (actionmouseover) {
say #bYour mouse is over this NPC
}


Spark910 08-25-2002 10:47 PM

NingNong just said there is already a command like that? Is this true!? if so what is it, I didnt see it in the commands new txt file. hm...

Python523 08-25-2002 11:41 PM

this can be done with just checking if the mousex/y is in a certain radius

Spark910 08-28-2002 03:14 AM

This wuld make it easier! 0_0

screen_name 08-28-2002 01:11 PM

Quote:

Originally posted by Spark910
This wuld make it easier! 0_0
It would be much easier.

RavenTelvecho 08-30-2002 08:58 AM

R0bin: It would be so easy, it wouldnt be worth using, like

if(playersays(This command is OBSOLETE))


emortylone 08-30-2002 10:46 AM

I QUITE agree with Raven. There is NO point in using it, plus you would have to have HOURS of Stefan making and debugging it to work, for WHAT possible purpose? I've already shown this code like 4+ times :'(
NPC Code:

if (created)
{ timeout=0.25;}
if (timeout)
{ if (abs(mousex-x)=<1 && abs(mousey-y)=<1)
{ actions;}
timeout=0.25;
}


This would check to see if it is within one space of it =/ Just use that.
---Shifter

Com013 08-30-2002 06:28 PM

Quote:

Originally posted by emortylone
NPC Code:

if (created)
{ timeout=0.25;}
if (timeout)
{ if (abs(mousex-x)=<1 && abs(mousey-y)=<1)
{ actions;}
timeout=0.25;
}



It would just check that the mouse is within a distance of one tile from the top left corner.

This might be a bit better:
NPC Code:

if (playerenters || timeout) {
if (mousex >= x && mousex < x+npcs[0].width &&
mousey >= y && mousey < y+npcs[0].height) {
// do stuff
}
timereverywhere;
timeout = 0.05;
}


RavenTelvecho 08-30-2002 08:31 PM

R0bin: Shifter, i post in blue, Im not raven :P

Spark910 08-31-2002 12:59 AM

but a code like I suggested would be easier and quicker.

Com013 08-31-2002 01:37 AM

life isn't always easy...
...as long as it is possible it is enough for me, no matter how hard it is.
Or it does matter...it shouldn't be too hard, but this is no too hard...


All times are GMT +2. The time now is 12:38 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.