View Single Post
  #4  
Old 11-26-2015, 01:19 PM
Kirko Kirko is offline
Registered Guest
Join Date: Dec 2014
Location: Texas
Posts: 61
Kirko is a jewel in the roughKirko is a jewel in the rough
So I got it to work some what. In class that the npc is joined to I have
PHP Code:
function onLayerChange(){
  
this.trigger("Update");
  
//this.chat = "test1";//this worked
  //this.layer = params[2];//can only be changed in clientside
  
this.triggeraction(this.x+.5,this.y+.5,"LayerChange2","");//doesnt work
}

//#CLIENTSIDE
function onPlayerEnters()
  
this.layer=this.attr[2]

//doesnt work
function onLayerChange2(){
  
this.trigger("Update");
  
this.chat "test2";
  
onPlayerEnters();

the layer only changes when I update level or reenter level. I tried triggering "Update" for the npc in my weapon script and some other thnigs but no luck
Reply With Quote