05-09-2006, 07:49 PM
|
Registered User
|
|
Join Date: Jul 2003
Location: Canada
Posts: 1,070
|
|
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. |
|
|