Witam. Mam taki problem, ?e jak posta? zaznaczy potwora no podbiega do niego i sie czasem zacina, no jak by kto? m?g? mi wyt?umaczy? jak zrobi? ?eby nie podbiega? tylko jak zobaczy np. demona to stanie w miejscu i b?dzie sta? i bi? a jak go ?abie to ?eby szed? dalej
jak u?ywam takiego skrypty ?eby zaznacza? potwora
jak u?ywam takiego skrypty ?eby zaznacza? potwora
PHP:
Const
MonsterList = ['Demon]
function GetCreatureByName: TCreature;
var
x: integer;
begin
Result := nil;
for x := 0 to Creatures.Count - 1 do
begin
if x >= Creatures.Count then Break;
if Creatures.Creature[x].Z = Self.Z then
for i := low(MonsterList) to high(monsterlist) do
if Creatures.Creature[x].Name = MonsterList[i] then
begin
Result := Creatures.Creature[x];
Exit;
end;
end;
end;
While not terminated do
begin
UpdateWorld;
C := GetCreatureByName;
if C <> nil then
if not self.attacking then
C.Attacking := true;
sleep(100);
end;
. Spr?buj u?y? nast?puj?cego skryptu:
.