thesirlaquishabonquiquithe3rd 0 Posted June 2, 2017 Hello im making an explosive goat script. The only problem is the 40mm keeps colliding with the goat and deactivates the 40mm. Im trying to use "disablecollisionwith" but the same thing keeps happening. view plain player addEventHandler ["Fired", { _bullet = _this select 6; _unit = _this select 0; _newPos = _unit modelToWorld [0,8,1]; _veh = createVehicle ["Goat_random_F",_newPos,[],0,"CAN_COLLIDE"]; _veh setDir getDir _unit; _veh setVelocity velocity _bullet; deleteVehicle _bullet; }]; player addEventHandler ["Fired", { _bullet = _this select 6; _unit = _this select 0; _newPos = _unit modelToWorld [0,8,1]; _veh1 = createVehicle ["G_40mm_HE",_newPos,[],0,"CAN_COLLIDE"]; _veh1 disablecollisionwith _veh; // I added this here before the projectile attatches to bullet _veh1 setDir getDir _unit; _veh1 setVelocity velocity _bullet; deleteVehicle _bullet; }]; Share this post Link to post Share on other sites
JSD 18 Posted June 2, 2017 Oh my god I love this. I messed around a little and got it to work with this: player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; if (_ammo == "G_40mm_HE") then { _goat = "Goat_random_F" createVehicle position _projectile; _goat attachTo [_projectile, [0, 0, 0] ]; }; }] Share this post Link to post Share on other sites
thesirlaquishabonquiquithe3rd 0 Posted June 2, 2017 3 minutes ago, JSD said: Oh my god I love this. I messed around a little and got it to work with this: player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; if (_ammo == "G_40mm_HE") then { _goat = "Goat_random_F" createVehicle position _projectile; _goat attachTo [_projectile, [0, 0, 1] ]; }; }] You dont know what this means to me . . . thank you :D Share this post Link to post Share on other sites
A Bandpass Filter 2 Posted June 2, 2017 Omg no kidding, I literally made a goat launcher a few weeks ago in a similar way (with attachTo) and as a mod with own goat magazine and goat ammo classes. Played around with launching trucks and hand grenades as well. I found that larger objects (goats and larger) attached to the projectile when using attachTo would lag behind the projectile (hilarious fun nonetheless). The mod version (With official goat ammo) didn't suffer from this comical but sometimes frustrating limitation:). 1 Share this post Link to post Share on other sites
HightowerGD 2 Posted June 2, 2017 In case you want goat shrapnel: (i tried to get this working with normal grenades but didnt figure it out yet) player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; if(["G_40mm_HE"] find _ammo >= 0) then { [_projectile] spawn { _projectile = _this select 0; _goat = "Goat_random_F" createVehicle position _projectile; _goat hideObject true; _goat attachTo [_projectile, [0, 0, 1] ]; waitUntil {!alive _projectile}; _position = getPosATL _goat; deleteVehicle _goat; _goatCount = round (random [4, 10, 15]); for "_index" from 1 to _goatCount do { _goat = "Goat_random_F" createVehicle _position; _randomX = random [-15, 0, 15]; _randomY = random [-15, 0, 15]; _randomZ = random [10, 20, 30]; _goat setVelocity [_randomX, _randomY, _randomZ]; [_goat] spawn { _goat = _this select 0; sleep 1; waitUntil {getPosATL _goat select 2 <= 2}; sleep random 5; deleteVehicle _goat; }; }; }; }; }] 1 Share this post Link to post Share on other sites
HightowerGD 2 Posted June 3, 2017 So I figured I'd upgrade this. player removeAllEventHandlers "Fired"; player allowDamage false; player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; if(["G_40mm_HE"] find _ammo >= 0) then { player addMagazine "1Rnd_HE_Grenade_shell"; [_projectile] spawn { _projectile = _this select 0; _goat = "Goat_random_F" createVehicle position _projectile; _goat hideObject false; _goat attachTo [_projectile, [0, 0, 1] ]; _cluster_arm_distance = 100; waitUntil {(player distance _projectile > _cluster_arm_distance) or !alive _projectile}; if(!alive _projectile) then { _position = getPosATL _goat; deleteVehicle _goat; _goatCount = round (random [4, 10, 15]); for "_index" from 1 to _goatCount do { _goat = "Goat_random_F" createVehicle _position; _randomX = random [-15, 0, 15]; _randomY = random [-15, 0, 15]; _randomZ = random [10, 20, 30]; _goat setVelocity [_randomX, _randomY, _randomZ]; [_goat] spawn { _goat = _this select 0; sleep 1; waitUntil {getPosATL _goat select 2 <= 2}; sleep random 5; deleteVehicle _goat; }; }; } else { _velocity = velocity _projectile; _parts = 4; _projectile_position = getPosATL _projectile; for "_index" from 1 to _parts do { _randomX = (round random [-10, 0, 10]) + (_projectile_position select 0); _randomY = (round random [-10, 0, 10]) + (_projectile_position select 1); _randomZ = (round random [-5, 0, 5]) + (_projectile_position select 2); _spawn_position = [_randomX, _randomY, _randomZ]; _goat = "Goat_random_F" createVehicle _spawn_position; _goat setPosATL (_spawn_position); "HelicopterExploBig" createVehicle getPos _goat; [_goat] spawn { _goat = _this select 0; waitUntil {position _goat select 2 < 2}; _position = position _goat; _bomb = "Bo_GBU12_LGB" createVehicle getPos _goat; deleteVehicle _goat; _goatCount = round (random [4, 10, 15]); for "_index" from 1 to _goatCount do { _goat = "Goat_random_F" createVehicle _position; _randomX = random [-15, 0, 15]; _randomY = random [-15, 0, 15]; _randomZ = random [10, 20, 30]; _goat setVelocity [_randomX, _randomY, _randomZ]; [_goat] spawn { _goat = _this select 0; sleep 1; waitUntil {getPosATL _goat select 2 <= 2}; _grenade = "R_60mm_HE" createVehicle getPosATL _goat; sleep random 5; deleteVehicle _goat; }; }; deleteVehicle _goat; }; }; }; }; }; }] Apologies there is one goat remaining at the end.... Change the 'R_60mm_HE' to any of the following: "Bo_Mk82","Bo_GBU12_LGB","R_60mm_HE","M_Titan_AT","R_80mm_HE","M_Mo_120mm_AT","M_Mo_120mm_AT_LG","M_Mo_82mm_AT_LG", 1 Share this post Link to post Share on other sites
JSD 18 Posted June 3, 2017 @HightowerGD That's just too great Share this post Link to post Share on other sites
goatboy 1 Posted June 3, 2017 22 hours ago, A Bandpass Filter said: Ahahahahahahaha. I like goats you can swim in them Share this post Link to post Share on other sites