![]() |
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...
|
wouldnt it be imgwidth(#f)/16 because img width returns the width in pixels?
|
Well then it'd be *16 for a tile.
16x16 = tile 1x1 = pixel pixel * 16 = tile |
Good Grief!! I must've gotten stuck between the 3rd and 4th visibility levels, *bangs on elavator buttons* Gah! me = stuck!!!
Yeah it should be imgwidth(#f(i))/16, unless it's put in above level 4, then it would need mousescreenx and mousescreeny... |
Did we get off subject lol
|
no. completely on topic.
|
Will someone help me make a timeout script for 30 seconds?
|
*slaps*
NPC Code: |
if (created) {
message Hahaha you don't know how to fix this =P; } |
EEk i didnt mean that way idiots.
I ment a timeout script thingy so it has to wait 30 seconds b4 i can lay another evil candy i tried timeout it didnt work. NPC Code: |
Heh i dun have the gif
|
Um, first make it not so goofy by using for loops and vecx, vecy, then try sleep. Unless you don't like sleep, then do something else.
|
Change gfx into anything as in block.png
|
Ebil CANDY!
Heres the script so far
The text file is on attachment. I still need to add the 30 secs but i dont know how to do it yet :D So u can add it if u like. NPC Code: |
....
WanDaMan how did you get apart from the asteria tile set in your sig?
|
| All times are GMT +2. The time now is 04:32 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.