| ffcmike |
08-15-2011 01:43 AM |
Quote:
Originally Posted by blackbeltben
(Post 1663591)
That can't be it, because it DOES play the sound which is after the "if" statement. so the problem must be somewhere else cause it is reconizing the click.
|
Ah in that case if this is a level NPC you cannot use triggerserver, this can only be used for local NPCs/putnpc2 objects, database NPCs and weapons.
You can accomplish the same thing by using triggeraction:
PHP Code:
function onCreated(){
//define area inwhich to receive the trigger
this.setshape(1, widthinpixels, heightinpixels);
}
function onActionSomething(params){
//stuff
}
//#CLIENTSIDE
function onMouseDown(){
if(mousewithinregionblahblah){
triggeraction(this.x + 1, this.y + 1, "Something", params);
}
}
The click however may still have only worked through some form of numerical fluke as a result of the large range you are checking for, it would probably still work if you clicked somewhere away from your target.
|