View Single Post
  #2  
Old 08-20-2009, 01:17 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I am pretty sure you can disable chat being shown with the enablefeatures function, then have a script loop through the players in the level, and draw using your bubble chat function.

A crude example that should work:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
// Enablefeatures except for chat text
  
enablefeatures(allfeatures-0x80);
  
// Begin looping
  
setTimer(0.05);
}

function 
onTimeout() {
  
// Hide Last Drawn Chat
  
hideimgs(2001000);
  
// Loop through Players in the level
  
for (temp.pplayers) {
    
// Record their chat and trim it.
    
temp.player_chat temp.p.chat.trim();
    if (
temp.p.chat != "") {
      
// Draw the Text over the player.
      
with (findimg(200 temp.p.id)) {
        
temp.p.1.5;
        
temp.p.0.5;
        
style "c";
        
text temp.player_chat;
      }
    }
  }
  
// Continue Looping
  
setTimer(0.05);

Obviously build from this example, and try to optimize the drawing routine instead of hiding and redrawing every time.

Other functions that may be of help:

onRemotePlayerChats(player_obj, player_chat);
__________________
Quote:
Reply With Quote