Polski Česky English Français Русский Español
Home Site Original War Support Community Forums Facebook YouTube Discord
Votre premičre visite? Regardez ça!
» Index > Modding Archive > SAIL - WantDismantle

SAIL - WantDismantle

Serpent pisze:Na prośbę Marta napisałem funkcję która zwraca prawdę jeśli jednostka (unit) chce rozmontować budynek (building).

Kod:

Export Function WantDismantle(unit, building);
var x, y;
begin
x := GetX(building);
y := GetY(building);

     if GetTaskList(unit) then
        begin
        if 'Y' = GetTaskList(unit)[1][1] and
             x = GetTaskList(unit)[1][2] and
             y = GetTaskList(unit)[1][3] then
           result := true
            else
             result := false;
        end
         else
          result := false;
End;

Użycie:

Kod:

// ...
if WantDismantle(eng1, magazyn) then
   // akcja..
// ...

Author: Serpent
Topic: https://forum.original-war.net/viewtopic.php?f=42&t=4543

» Index > Modding Archive > SAIL - WantDismantle