Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Sending Information Serverside -> Clientside (https://forums.graalonline.com/forums/showthread.php?t=64839)

Bl0nkt 03-20-2006 02:44 AM

Sending Information Serverside -> Clientside
 
Well, I can't figure out a way to do this. I've tried:

triggeractions
functions
assigning things to vars/strings/arrays

Here's an example of a script that won't work:

NPC Code:
function onCreated()
{
setshape(1, 32, 32);
}

function onPlayerchats()
{
if (player.chat == "test")
{
triggeraction(x+.1, y+.1, "test", "clientside");
}
}

//#CLIENTSIDE
function onCreated()
{
setshape(1, 32, 32);
}

function onactiontest()
{
if (params[0] == "clientside")
{
message("recieved");
}
}



If you know how, let me know. Thank you.

PeptoB 03-20-2006 03:11 AM

triggerAction(x+.1,y+.1,"clientside","test");
^ ^
1st of all

and recieve it using function onActionClientside(){
if (params[0] == "test"){
message("recieved");
}
}

triggerClient() is easier

Bl0nkt 03-20-2006 03:19 AM

What said is what I did, and it's not working.

Also, triggerClient()?

how do I use it?

ZeLpH_MyStiK 03-20-2006 03:58 PM

Quote:

Originally Posted by Bl0nkt
What said is what I did, and it's not working.

Also, triggerClient()?

how do I use it?

Actually, it's very different from what you did.

excaliber7388 03-20-2006 04:28 PM

why the +.1?

Skyld 03-20-2006 07:33 PM

Quote:

Originally Posted by excaliber7388
why the +.1?

Well, having used setshape() or so to define the shape of the NPC, you would try and triggeraction onto the surface of the NPC.

Yen 03-20-2006 09:40 PM

Well, the last time I tried to do it the only way to communicate serverside -> clientside was to write to/read the attr[] variables.


All times are GMT +2. The time now is 09:17 PM.

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