Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Server (https://forums.graalonline.com/forums/forumdisplay.php?f=14)
-   -   Triggeraction (https://forums.graalonline.com/forums/showthread.php?t=21687)

BocoC 01-21-2002 02:34 PM

Triggeraction
 
Does anybody here know how to get triggeraction to work serverside? Cause for me it only works clientside. I have tried every serverside/clientside combination there is, and only sending clientside and recieving clientside works. Is there some special tag to go with it, like putting server in front of the action to send an action to the control NPC, to get it to work serverside?

Slaktmaster 01-21-2002 02:48 PM

You have to put server before the action name on server-side scripts and then read the action with if (actionserveractioname)

BocoC 01-22-2002 12:51 AM

Quote:

Originally posted by Slaktmaster
You have to put server before the action name on server-side scripts and then read the action with if (actionserveractioname)
Didn't work.

Admins 01-24-2002 09:33 PM

It should work the same, but you need to make sure
the npc actually has some size
(like use setshape 1,48,48 or setshape2) because
otherwise the npcserver thinks its a hidden npc
and doesn't get the action since 'triggeraction'
triggers actions on a special point

BocoC 01-25-2002 07:12 AM

Does Setshape need to be clientside or serverside? Cause it seems to only work clientside, so I had put it clientside. Let me try putting it serverside and testing the triggeraction...

BocoC 01-25-2002 07:19 AM

Yay! It worked. I also found out that you need to put setshape in both clientside and serverside. Clientside if you wanna change how the NPC blocks the player, and serverside for triggeraction and washit stuff. Stefan, you should add wasshot and waspelt to the serverside actions!

BocoC 01-25-2002 07:26 AM

Stefan, could you also make it so you don't have to do showcharacter; to be able to use the washit function? Because washit only works if you call showcharacter; in the code.

*Edit*
On second thought, I can't seem to get washit to work anymore... =/ I called setshape 1,48,48; both serverside and clientside, and I called showcharacter; both serverside and clientside, AND I put:
if (washit) message Hit;
on the serverside portion of it.
Still no luck. =/ NPC Server hates me...
*Edit*

kittygirl765 01-27-2002 02:54 AM

could u mix setshape and setshape2 together?

liek i just made this up...........
NPC Code:

if(created||initialized)
setshape 1,64,64;
if(actionblah)
attatchplayertoobj 0,someID;
//#CLIENTSIDE
if(playerenters)
setshape 4,4,{
22,22,22,22,
22,0,0,22,
22,0,0,22,
22,22,22,22};
if(playertouchsme) {
playerx=x+0.5;
playery=y+0.5;
triggeraction x,y,blah,;
}


Admins 01-31-2002 11:05 PM

Yes, on server-side use setshape, on
client-side use setshape or setshape2.

That washit thing should work on both
client- and server-side. One thing that is
important is to give the npc power,
like hearts = 3; otherwise the server/client
thinks its a dead npc

BocoC 02-01-2002 06:59 AM

Quote:

Originally posted by Stefan
Yes, on server-side use setshape, on
client-side use setshape or setshape2.

That washit thing should work on both
client- and server-side. One thing that is
important is to give the npc power,
like hearts = 3; otherwise the server/client
thinks its a dead npc

Oh, ok. Thanks Stefan.

Goboom 02-05-2002 05:42 AM

THis has nothing to do with your post boco but i contributed alot to your foundation but you never did add my contributions to it!!!! (BOCO=MAKES GOBOOM CRY) :grrr:

BocoC 02-05-2002 06:43 AM

Quote:

Originally posted by Goboom
THis has nothing to do with your post boco but i contributed alot to your foundation but you never did add my contributions to it!!!! (BOCO=MAKES GOBOOM CRY) :grrr:
Um, the Hey Stefan, Give Kaimetsu An Account Foundation?


All times are GMT +2. The time now is 02:15 PM.

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