Results 1 to 8 of 8
  1. #1
    adyson_19's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    0
    My Mood
    Bitchy

    how can i add icon above the head ??

    can someone help me here ?? I want to know if i can add icon above the head..and that icon can be seen by both teams.Like that icon from sabotage ..when u have the bomb...the enemy see that KILL icon above your head !

  2. #2
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Code:
    self.headIcon = newHudElem();
    self.headIcon.x = self.origin[0];
    self.headIcon.y = self.origin[1];
    self.headIcon.z = self.origin[2] + 50;
    self.headIcon.alpha = 0.85;
    self.headIcon setShader( "shaderhere", 10,10 );
    self.headIcon setWaypoint( true, true, false );
    self thread updateHeadIcon();
    
    updateHeadIcon()
    {
    self endon("death");
    
         for(;;)
         {
              self.headIcon.x = self.origin[0];
              self.headIcon.y = self.origin[1];
              self.headIcon.z = self.origin[2] + 50;
              wait 0.1;
         }
    }
    Try that, not entirely sure

  3. The Following User Says Thank You to Arasonic For This Useful Post:

    sat 24 (02-09-2011)

  4. #3
    adyson_19's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    0
    My Mood
    Bitchy
    it doesnt work.other ideas ?

  5. #4
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    How did you use it?

  6. #5
    adyson_19's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    0
    My Mood
    Bitchy
    I have an anticamp script ...and when someone camp i want to atach this icon above his head.

    Code:
    doheadicon()
    {self.headIcon = newHudElem();
    self.headIcon.x = self.origin[0];
    self.headIcon.y = self.origin[1];
    self.headIcon.z = self.origin[2] + 50;
    self.headIcon.alpha = 0.85;
    self.headIcon setShader( "waypoint_kill", 10,10 );
    self.headIcon setWaypoint( true, true, false );
    self thread updateHeadIcon();
    }
    updateHeadIcon()
    {
    self endon("death");
    
         for(;;)
         {
              self.headIcon.x = self.origin[0];
              self.headIcon.y = self.origin[1];
              self.headIcon.z = self.origin[2] + 50;
              wait 0.1;
         }
    }
    DoCamp()
    {
       bla bla bla
       if(self is camping)
        {
          self thread doheadicon();
        }
    }
    And i add this line
    Code:
    precacheShader( "waypoint_kill);
    on init() thread.

  7. #6
    Arasonic's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    569
    Reputation
    11
    Thanks
    115
    Quote Originally Posted by adyson_19 View Post
    And i add this line
    Code:
    precacheShader( "waypoint_kill);
    on init() thread.
    precacheShader( "waypoint_kill");

    Did you forget the " in the code, or just a typo here?

  8. #7
    adyson_19's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    0
    My Mood
    Bitchy
    i didnt get "syntax error" in the main code.That mistake it's just here on the forum.Sorry.Do u know onother script that add icon above head ??take a look in _friendsicon.gsc from common_mp.ff file.

  9. #8
    adyson_19's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    28
    Reputation
    10
    Thanks
    0
    My Mood
    Bitchy
    nobody knows??