View Single Post
  #4  
Old 01-08-2006, 12:57 PM
jake13jake jake13jake is offline
Former Classic Staff
jake13jake's Avatar
Join Date: Dec 2002
Location: Northwest Vermont
Posts: 1,452
jake13jake will become famous soon enough
Quote:
Originally Posted by ApothiX
Yea, a little bit of code / variable output would be beneficial.
PHP Code:
  else if (player.chat.starts("/focus")) {
    
player.chat.tokenize();
    if (
tokens[1] == "self")
      
this.cameraFocus player;
    else if (
tokens[1])
      
this.cameraFocus getPlayer(tokens[1]) == -player getPlayer(tokens[1]);
  } 
was using findplayer(tokens[1]) in this code. It is supposed to setfocus on the player in tokens[1]. However, when I used findplayer() I was having a slight problem. It was recognizing the other player's existence, but it wasn't getting the x or y values right. They remained constant at 30.5,30. When I asked the player to log off RC, the script with findplayer() worked. I just used a for loop function getPlayer i made to cycle through the players array for the level. Solved the problem. But should findplayer() really find RCs? would seem proper for it to cycle over them.
Reply With Quote