Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 04-16-2011, 12:14 AM
MattKan MattKan is offline
the KattMan
Join Date: Aug 2010
Location: United States
Posts: 1,325
MattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to beholdMattKan is a splendid one to behold
Send a message via AIM to MattKan
Clientside to Serverside?

I've been having trouble with getting things that happen clientside on your screen to appear on everybody elses's screens.

Right now my goal is to rescript chat. I had this idea, and I took a little script that my friend had used on a sign in a level and altered it a little bit so that it showed above the player as chat.

Surprisingly, I was able to actually get it to work, but it only works clientside and nobody else can see it.

Could someone help with this and explain it to me so that in the future, when I do something similar, I won't have to ask for help?

PHP Code:
//#CLIENTSIDE
function onPlayerChats()
{
  
player.msg " " player.chat " ";
  
setTimer(0.05);
  
hide();
}

function 
onTimeout()
{
  
with (findImg(-1))
  {
    
text player.msg;
    
player.1.5;
    
player.2;
    
style "bc";
    
layer 1;
    
red 1;
    
green 1;
    
blue 1;
    
zoom 1;
  }
  
setTimer(0.05);

Oh, and on a side note, is there a command that you can use to hide your default chat text?
Reply With Quote
  #2  
Old 04-16-2011, 12:19 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Use enablefeatures for hiding chat. Then just set player.chat and display it using your custom code. The only way to reliably show it for other players is to either use a GANI script or a system weapon which loops through all players.
__________________
Reply With Quote
Reply


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 12:51 PM.


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