Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 06-25-2006, 12:04 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
The 'leftmousebutton' variable might not be set anymore at the time the script is run though, so if people click fast then it might not work.
So either do (in old script):
PHP Code:
//#CLIENTSIDE
if (mousedown && strequals(#p(0),left)) {
  
putbomb 1,mousex,mousey;

or (new scripting):
PHP Code:
//#CLIENTSIDE
function onMouseDown() {
  
putbomb 1,mousex,mousey;

The onMouseDown event is only invoked on left mouse click, there is also onRightMouseDown for the right mouse button, may be should add some onMiddleMouseDown too.
http://wiki.graal.net/index.php/Crea...ent/GuiControl
Reply With Quote
 


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 02:40 PM.


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