View Single Post
  #1  
Old 02-17-2012, 08:59 AM
Tricxta Tricxta is offline
The Muffin Man
Tricxta's Avatar
Join Date: Oct 2010
Location: Australia
Posts: 563
Tricxta is a jewel in the roughTricxta is a jewel in the rough
Not sending the full array

I have this code
PHP Code:
function onPlayertouchsme(){
  
temp.heads 0;
  for (
temp.i:level.(player.BowlingGroup "_BowlingGroup")){
    
temp.head findplayer(temp.i).head;
    
temp.heads.add(temp.head);
  }
  
triggeraction(this.x+1,this.y+1,"Show",(temp.heads));
}

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

function 
onActionShow(){
  
temp.heads params[0];
  
this.chat this.attr[1];
  
//this.chat = temp.heads;
  
with(findimg(300)){
    
image "tricxta_group-bowling-gui.png";
    
100;
    
100;
    
layer 4;
  }
  for (
temp.i=0;temp.i<4;temp.i++){
    
with(findimg(301+temp.i)){
      
image temp.heads[temp.i];
      
partX 0;
      
partY 64;
      
partW 32;
      
partH 32;
      
100;
      
132 temp.i*32;
      
layer 5;
    }
  }

The problem is it constructs the head array fine but once sent by the triggeraction to the client, it only receives the first element. Does anyone know a way around this or how to send the whole array?
Reply With Quote