View Single Post
  #1  
Old 01-21-2010, 05:39 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
(@ "Name" @ var) edit: hmm, or maybe you don't need the initial concat!

However, you'd much rather use catchevent with such dynamically named objects, since otherewise you'd have to account for each var, and subsequent name.

PHP Code:
new GuiControl("Name" @ var) {
  
catchevent(this.name,"onMousedown","onGUIclicked");
}

function 
onGUIclicked(obj,keymod,mx,my,clicks) {
  
player.chat obj.name " was clicked at " mx SPC my  ", " clicks " times!";

Reply With Quote