Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-20-2006, 02:44 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
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.
Reply With Quote
  #2  
Old 03-20-2006, 03:11 AM
PeptoB PeptoB is offline
Banned
PeptoB's Avatar
Join Date: Mar 2006
Location: Leominster, MA
Posts: 22
PeptoB is on a distinguished road
Send a message via AIM to PeptoB Send a message via MSN to PeptoB
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
Reply With Quote
  #3  
Old 03-20-2006, 03:19 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
What said is what I did, and it's not working.

Also, triggerClient()?

how do I use it?
Reply With Quote
  #4  
Old 03-20-2006, 03:58 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
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.
__________________
Reply With Quote
  #5  
Old 03-20-2006, 04:28 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
why the +.1?
Reply With Quote
  #6  
Old 03-20-2006, 07:33 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
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.
__________________
Skyld
Reply With Quote
  #7  
Old 03-20-2006, 09:40 PM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
Well, the last time I tried to do it the only way to communicate serverside -> clientside was to write to/read the attr[] variables.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 04:48 AM.


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