Подскажите где ошибка. Я хотел сделать так что бы сриттеры нападали на других криттеров вот код
Procedure.h
#define var variable
var Critter;
var Combat1;
var Combat2;
var Critter_Count;
procedure SetEnc(var TYPE, var SCRIPT, var ITEM, var MONEY, var TILE, var DIRECTION, var DISTANCE) begin
var Critter_Tile;
var Critter_Item;
var Critter_Rotation;
//while (Critter_Count < COUNT) do begin
Critter := create_object_sid(TYPE, -1, -1, SCRIPT);
Critter_Tile:=tile_num_in_direction(TILE, DIRECTION, DISTANCE);
critter_attempt_placement(Critter, Critter_Tile, elevation(dude_obj));
//Critter_Rotation := rotation_to_tile(tile_num(Critter), tile_num(dude_obj));
//critter_attempt_placement(Critter, Critter_Rotation, elevation(dude_obj));
anim(Critter,ANIMATE_ROTATION,rotation_to_tile(tile_num(Critter),tile_num(dude_obj)));
Critter_Item:=create_object_sid(ITEM, -1, -1, -1);
add_obj_to_inven(Critter, Critter_Item);
wield_obj_critter(Critter, Critter_Item);
Critter_Count := Critter_Count + 1;
//critter_add_trait(Critter,TRAIT_OBJECT,OBJECT_TEAM_NUM,TEAM);
//Critter:=TARGET;
//attack_setup(Combat1, Combat2);
//end
//anim(Critter,ANIMATE_ROTATION,rotation_to_tile(tile_num(Critter),tile_num(dude_obj)));
end
//#define SetEnc(x1, x2, x3, x4, x5, x6, x7, x8)\
//call SetEnc(x1, x2, x3, x4, x5, x6, x7, x8) \
ARTEMPLE.SSL
while (Critter_Count < 3) do begin
call SetEnc(PID_GUN_THUG_MALE, -1, PID_SHOTGUN, random(25, 30)*dude_luck, tile_num(dude_obj), 0, 10);
Critter:=Combat1;
attack_setup(Combat1, Combat2);
end
Critter_Count:=0;
while (Critter_Count < 3) do begin
call SetEnc(PID_TOUGH_GOLDEN_GECKO, -1, 0, 0, tile_num(dude_obj), 0, 10);
Critter:=Combat2;
attack_setup(Combat1, Combat2);
end
attack_setup(Combat1, Combat2);
И я не как не могу понять как заставить их друг друга атаковать.