Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-09-2006, 07:49 PM
Shaun Shaun is offline
Registered User
Shaun's Avatar
Join Date: Jul 2003
Location: Canada
Posts: 1,070
Shaun is a jewel in the roughShaun is a jewel in the rough
Question Trigger not receiving

Does anybody have any idea as to why this trigger is not receiving? This is a class npc and there is another class npc that uses the same format to send/receive triggers and it does work, yet I find this one does not.

Any help would be greatly appreciated and for convenience, I have instead of just typing it out made it a colour-coded image:

Quote:
Originally Posted by Chair Script
// Chair 1 made by Shaun

function onCreated() {
this.image = "dolphonia_chair.png";
setshape(1,2,2);
drawunderplayer();
canbepushed();
canbepulled();
}
function onActionactserverside(chairfunc) {
serverr.test = "the trigger has been received!";
if (chairfunc == 1) {
setshape2(2,2,{3,3,3,3});
}
else if (chairfunc == 2) {
setshape2(2,2,{21,21,21,21});
}
else if (chairfunc == 3) {
destroy();
}
}

//#CLIENTSIDE

function onPlayerChats() {
if (player.chat == "destroy") {
chairfunc = 3;
triggeraction(x+(1/16),y+(1/16),"actserverside",chairfunc);
}
if (player.chat == "move") {
chairfunc = 2;
triggeraction(x+(1/16),y+(1/16),"actserverside",chairfunc);
}
if (player.chat == "sit") {
chairfunc = 1;
triggeraction(x+(1/16),y+(1/16),"actserverside",chairfunc);
}
}
Thanks.
Attached Thumbnails
Click image for larger version

Name:	shaun_chairscript.gif
Views:	189
Size:	8.2 KB
ID:	36353  
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 09:32 AM.


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