SAIL - Load Character

Free modding tutorials and source codes.

Moderatoren: zoNE, Antitheus

Antworten
Benutzeravatar
zoNE
The Great Uniter & Site Administrator
The Great Uniter & Site Administrator
Beiträge: 2061
Registriert: Fr Feb 17, 2006 3:44 pm
Wohnort: Poland
Kontaktdaten:

SAIL - Load Character

Beitrag von zoNE »

stucuk hat geschrieben:if you are using the LoadCharacter function (Which was designed by Radzio) then it does the following (Below is the sail version, you do not need to have the SAIL version in your code as LoadCharacter was made into an actual command).

Code: Alles auswählen

export function LoadCharacter(ident,klasa,number); 
  begin
   if TestCharacters(ident) then
   begin
    if CheckCharacterSet(ident)>1 then
    begin
     if number>0 then
     if klasa>0 then
      CreateOneCharacterFromSetWithClass(ident,number,klasa)
     else
      CreateOneCharacterFromSet(ident,number)
     else
      CreateCharacterSet(ident);
    end
    else
     if klasa>0 then
      CreateCharacterWithClass(ident,klasa)
     else
      CreateCharacter(ident);
   end
   else
    NewCharacter(ident);
  end;
So if you have any saved characters then it should(AFAIK) bring them back exactly as they were.

Example:
Stucuk := LoadCharacter('stucuk',0,0);
Author: Stucuk
Topic: http://forum.original-war.net/viewtopic ... c&start=15
Antworten