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 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
 


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 01:02 PM.


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