![]() |
Mouse Script!
1 Attachment(s)
// NPC made by KuJi
if (playertouchsme) {toweapons Test; } if (actionleftmouse) { putnpc block.gif,test.txt,mousex,mousey; } Y do i have to click the npc and where my x/y where i clicked the npc it lays. |
actionleftmouse is sent whenever the player clicks on the NPC.
You'd have to use the event "mousedown". It is triggered when any button was pressed, no matter where you pressed it. Your script would have to look like that: NPC Code: That should work. |
Thanks
It worked now i just gotta finish working the deleting of them lol Im gonna see if it will work with what u thought me :D |
Thanks a bunch!
Finished yay!
|
I was fooling around the other day with the mousedown and mousex/y commands.
I'll post what I had here shortly. |
Yeh i want to make a script were when u put ur cursur under a npc or player i says somet=)
|
NPC Code: |
NPC Code: Bah, I know this isn't the whole script, but now you get the fun of finishing it! Whoop-diedoo... [EDIT] *bangs head on wall* forgot img for w/h... |
LOLz. I usually do a timeout and check if abs(mousex-x)=<2 && abs(mousey-y)=<2 something like that so that it checks for the distance :)
---Shifter |
when you do that this is what happens:
Black - target area of what you want to be clickable white - areas that are also clickable http://members.aol.com:/michaelangelo36/tiles.gif Unless for whatever reason your images are centered on their x/y... |
Thanks knuckles youve helped me alot!
|
Quote:
|
Quote:
|
was talking to chad
|
Crap, yeah that's what I meant to put...
|
| All times are GMT +2. The time now is 01:51 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.