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
  #1  
Old 02-11-2012, 10:37 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
catchevent parameters?

So I am trying to pass a variable with an event.. Not sure if it's possible? Or if I am way wrong on how to do it? I am planning to have let's say 10 images, and clicking on them will make the player chat the number of the image it clicked on..

PHP Code:
//#CLIENTSIDE
function onCreated() {
  for ( 
010i++ ) {
    new 
GuiShowImgCtrl("test" i) {
      
55;
      
50 40;
      
image "block.png";
      
thiso.catchevent(this"onMouseDown""onSelect"i); 
    }
  }
}
function 
onSelect() {
  
player.chat "a" SPC params[0];

Didn't work.

Removing i from catchevent(), however, shows the name of the Control.
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 12:18 PM.


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