![]() |
MouseDown NPC
Is there a way to detect if the mouse has been clicked on a certain NPC in the level rather than just detecting if the mouse has been clicked?
|
Theres this.
PHP Code:
PHP Code:
|
Thank you! Was racking my brains so hard. Can't even do the simple stuff sometimes D:
|
You can also use this (probably prefered in a timeout):
if (leftmousebutton) { |
Quote:
|
Just so I can understand this and use it myself in future...
PHP Code:
|
Quote:
|start, end| defines a range between the two given values. So, PHP Code:
|
may i ask how you actually get them lines? i usually get them off character map, is there some kind of alt + numpad key combination?
|
Quote:
http://ascii-table.com/img/keyboard-103P.png |
My keyboard doesnt have that one it O.O even pressing shift + that does nothing..
time for a new keyboard? Lol i still have one of them old keyboards that are whote/crewmy coloured plastic and the keys are really loud. its deffinetly time for a new one. thanks crow. |
Does it even shop up on your key board?
|
The pipe key can also be located next to the backspace key, and can appear to be two vertical lines instead of one solid line. It's also on the same key as the backslash \.
http://support.free-conversant.com/4...e/pipeKey2.jpg I find it hard to believe your keyboard doesn't have it. |
It is located to the lower left of my keyboard, next the the shift key and is like a pipe but with a space in the middle.
|
AHHH mine has it as the broken line.
i didnt know that key does that line. when i was looking i was only looking for a straight line. thanks fowlplay :D |
You can use curly brackets for in, also.
|
Quote:
http://en.wikipedia.org/wiki/List_comprehensions at least I assume Graal is using some sort of implementation of List Comprehension where |30, 40| is returning the set of all numbers where x is an item in the set of real numbers, for which x is greater or equal to 30 and less than or equal to 40 |
Quote:
|
Quote:
Also, I didn't mean that the brackets act the same as |a,b|. I didn't go into any detain; sorry if there was any confusion. Quote:
|
I noticed this in a script the other day:
10 in |0,10> echos 0 10 in |0,10| echos 1 0 in <0,10| echos 0 1 in <0,10> echos 1 So you're not limited to using | between two values but can use < and > to do just less than or greater than. |
Yeah I was playing with them, too.
<6,9> includes just values between them, so 7 and 8. |6,9> is 6, 7, and 8. <6,9| is 7, 8, and 9. |6,9| is 6, 7, 8, and 9. I don't see why you'd ever need to mix them though. |
| All times are GMT +2. The time now is 06:51 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.