View Single Post
  #59  
Old 10-28-2012, 02:48 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Kiwi27 View Post
[9:56:33 AM] Vinka: Could you tell fp4 that whenever u edit an npc script within a level with olne and click apply, the line where image name is inserted turns to "-".

From Vinka.
Fixed. Either re-download the entire script from my post above or replace the function at the bottom with this one:

PHP Code:
function onApplyScript(obj) {
  if (!
this.active) {
    
obj.parent.destroy();
    return;
  }
  
temp.npc_id obj.parent.npc_id;
  
temp.npc_script obj.parent.scriptctrl.getlines();
  
temp.npc_img obj.parent.imgctrl.text.trim();
  
obj.parent.destroy();
  
with (findimg(temp.npc_id)) {
    
image temp.npc_img;
    
image fileexists(image) ? image PLACEHOLDER;
    
temp.npc_x 64;
    
temp.npc_y 64;
  }
  
setNPCImage(temp.npc_idtemp.npc_img);
  
setNPCScript(temp.npc_idtemp.npc_script);
  if (
temp.npc_id 0) {
    
changesMade();
    
updateNPCImage(temp.npc_idtemp.npc_imgtemp.npc_xtemp.npc_ytemp.npc_script);
  }

__________________
Quote:
Reply With Quote