Hi folks,
I have a problem with Tajin's sheepbomb script,the script includes 2 SQF files,"baa" and "sheepmove" SQF.But,I changed the sheep to boar,and then it doesn't work,no boar with satchel charge appears.So ,what's wrong?:confused:
baa.SQF
_unit = _this select 0;
_weapon = _this select 1;
_muzzle = _this select 2;
_mode = _this select 3;
_ammo = _this select 4;
_shot = player;
_pos = [];
_vecup = [];
_vecdir = [];
_speed = [];
_new = player;
if (_ammo == "PipeBomb") then {
sheepbomb = creategroup side _unit;
_shot = nearestObject [_unit, _ammo];
sleep 0.005;
"sheep" createUnit [getPos _shot,sheepbomb,'mysheep=this',1,'COLONEL'];
sleep 0.005;
_sheep = mysheep;
_sheep setPos (_unit modelToWorld [0,1,0]);
_sheep setCaptive true;
_sheep setDir getDir _unit;
_shot attachTo [_sheep,[0,0.45,0.82]];
_shot setVectorDirAndUp[[1,0,0],[0,1,0.2]];
_sheep doMove (_sheep modelToWorld [0,100+random 100,0]);
nul=[_sheep,_unit,_shot] execVM "sheepmove.sqf";
};
***********************************************************************************************************
sheepmove.SQF
_sheep = _this select 0;
_owner = _this select 1;
_bomb = _this select 2;
while {alive _sheep} do {
_enemy = _owner findNearestEnemy _sheep;
if (_enemy distance _sheep < 40) then {
_sheep doMove getPos _enemy;
_sheep doFollow _enemy;
sleep 1;
};
if ((!alive _bomb) || (_enemy distance _sheep < 3)) then {
_sheep setDamage 1;
};
};
_owner action ["TOUCHOFF", _owner];
sleep 5;
deleteVehicle _sheep;
************************************************************************************************************
I changed all the sheep to boar in the two SQF files,whs wrong?
Thank you dudes.
regards