Difference between revisions of "TNewPlayer.Name"

From Soldat Community Wiki
Jump to: navigation, search
(Created page with " '''''property TNewPlayer.Name''''' Acess mode: RW ==Description== Name of the bot. == Example == <syntaxhighlight lang="pascal"> var MyBot: TNewPlayer; begin ...")
 
m (Example)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  '''''property TNewPlayer.Name'''''
+
  '''''property Name: string'''''
   Acess mode: RW
+
   Access mode: RW
 
==Description==
 
==Description==
 
Name of the bot.
 
Name of the bot.
Line 13: Line 13:
 
       MyBot.Name := 'Mr. Vanilla Milkshake'; //here it is!
 
       MyBot.Name := 'Mr. Vanilla Milkshake'; //here it is!
 
       MyBot.Team := 1;
 
       MyBot.Team := 1;
      MyBot.Headgear := 0; //nothing on the head
 
 
       MyBot.PantsColor := $FFFFFFFF;
 
       MyBot.PantsColor := $FFFFFFFF;
 
       MyBot.SkinColor := $FFFFFFFF;
 
       MyBot.SkinColor := $FFFFFFFF;
       Players.Add(MyBot);
+
       Players.Add(MyBot, TJoinNormal);
 
     finally
 
     finally
 
       MyBot.Free;
 
       MyBot.Free;
Line 22: Line 21:
 
   end;
 
   end;
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
[[Category:TNewPlayer]]

Latest revision as of 16:12, 9 June 2018

property Name: string
 Access mode: RW

Description

Name of the bot.

Example

   var
    MyBot: TNewPlayer;
  begin
    MyBot := TNewPlayer.Create;
    try
      MyBot.Name := 'Mr. Vanilla Milkshake'; //here it is!
      MyBot.Team := 1;
      MyBot.PantsColor := $FFFFFFFF;
      MyBot.SkinColor := $FFFFFFFF;
      Players.Add(MyBot, TJoinNormal);
    finally
      MyBot.Free;
    end;
  end;