Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-31-2002, 03:20 AM
voicedcow6666 voicedcow6666 is offline
Registered User
Join Date: May 2002
Location: Texas
Posts: 182
voicedcow6666 is on a distinguished road
x/y - screenwidth/screenheight

ok, let me try to explain what's going on. I've been racking my brain for this for awhile, I've got it somewhat figured out though.


I have an image I'm displaying on the client's screen using showimg and changeimgvis of 4, so it's using screenwidth/screenheight. There is a part of this menu I want to be able to click on to make changes happen. This is the part I'm having trouble with, I have to convert the mousex/mousey to work with screenwidth/screenheight.

I dunno, anyone know how to do this? I'm giving myself a headache trying to think about it....
Reply With Quote
  #2  
Old 08-31-2002, 03:43 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
GrowlZ:

No need. Ever heard of mousescreenx and mousescreeny? They return the location of the mouse in pixels. mousex and mousey only show the location on the game screen (x,y of 0,63).
__________________
[signature]insert here[/signature]
Reply With Quote
  #3  
Old 08-31-2002, 03:48 AM
voicedcow6666 voicedcow6666 is offline
Registered User
Join Date: May 2002
Location: Texas
Posts: 182
voicedcow6666 is on a distinguished road
Quote:
Originally posted by screen_name
GrowlZ:

No need. Ever heard of mousescreenx and mousescreeny? They return the location of the mouse in pixels. mousex and mousey only show the location on the game screen (x,y of 0,63).



oooooohhhhhh ok, thanks. <3
Reply With Quote
  #4  
Old 08-31-2002, 03:49 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
GrowlZ:

No problem. Need any more help, just post, and I'll see what I can do.
__________________
[signature]insert here[/signature]
Reply With Quote
  #5  
Old 08-31-2002, 05:26 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
HOw do you use mousescreenx and mousescreeny? I haven't had a use for these yet, but I figure I'd do an abs(mousex-screenwidth/2)=<1 or whatever. Hmm...
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #6  
Old 08-31-2002, 08:45 AM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
NPC Code:

if (mousescreenx in |5,50| && mousescreeny in |5,50|) {
setplayerprop #c, #v(mousescreenx),#v(mousescreeny);
} else {
setplayerprop #c, ;
}



Simple code.
__________________
[signature]insert here[/signature]
Reply With Quote
  #7  
Old 09-02-2002, 02:40 AM
emortylone emortylone is offline
Registered User
Join Date: Apr 2002
Location: Control-NPC
Posts: 834
emortylone is on a distinguished road
lol. I have never used in but I've seen it. x.x
---Shifter
__________________
Quote:
*Stefan: it seems sometimes they hire newbie scripters everywhere x-x
*Stefan: scripters are sometimes like people that draw paintings
*Stefan: all that counts is that it looks nice
Reply With Quote
  #8  
Old 09-05-2002, 12:32 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by screen_name
NPC Code:

if (mousescreenx in |5,50| && mousescreeny in |5,50|) {
setplayerprop #c, #v(mousescreenx),#v(mousescreeny);
} else {
setplayerprop #c, ;
}



Simple code.
with "Mousedown" works?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:34 PM.


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