View Single Post
  #1  
Old 06-24-2013, 11:23 PM
defaultaccount defaultaccount is offline
Cassini
Join Date: Feb 2006
Location: HeLLifAX
Posts: 299
defaultaccount is on a distinguished road
Triggeraction on classes

I need help on a script I'm making. I'm trying to destroy a npc by trigger the server to destroy the npc, but it's not working for me I searched for triggeractions but I think mines set up correctly. its from a weapons script that places a class npc, im trying to get it to delete itself, on clientside it only deletes until you walk in the level again.

this is the class script

NPC Code:
function onActionTrigger() {
destroy();
this.destroy();
}

//#CLIENTSIDE

function onCreated() {
setShape(1, 32, 32);
setimg("pb_bmp.png");
drawunderplayer;
dontblock;
setcharani("pb_bmp-clip", null);
this.dir = (player.dir) % 4;
settimer(1.00);
}

function onTimeout() {
triggeraction(x, y, "Trigger");
}

Reply With Quote