wjpenn 10 Posted July 24, 2009 Guys Ive been reading all day and put together a script from various sources to get this far. I have one problem though. I have Harriers (1 and 2 models), Cobras, and Blackhawks to Rearm/Refuel/Repair throughout the mission. Only problem is when i roll the vehicle over the trigger it arms the vehicle with every weapon from every vehicle in the script that it may reload at any given time! My script in my .sqs file is as follows..... _vehicle = _this select 0 _vehicle setfuel 0; _vehicle removemagazines "300Rnd_25mm_GAU12"; _vehicle removemagazines "6Rnd_mk82"; _vehicle removemagazines "2Rnd_Sidewinder_AH1Z"; _vehicle removemagazines "14Rnd_FFAR"; _vehicle removemagazines "6Rnd_GBU12_AV8B"; _vehicle removemagazines "750Rnd_M197_AH1"; _vehicle removemagazines "8Rnd_Hellfire"; _vehicle removemagazines "38Rnd_FFAR"; _vehicle removemagazines "2Rnd_Sidewinder_AH1Z"; _vehicle removemagazines "100Rnd_762x51_M240"; ~3 _vehicle addmagazine "300Rnd_25mm_GAU12"; ~3 _vehicle addmagazine "6Rnd_mk82"; ~3 _vehicle addmagazine "2Rnd_Sidewinder_AH1Z"; ~3 _vehicle addmagazine "14Rnd_FFAR"; ~3 _vehicle addmagazine "6Rnd_GBU12_AV8B"; ~3 _vehicle addmagazine "750Rnd_M197_AH1"; ~3 _vehicle addmagazine "8Rnd_Hellfire"; ~3 _vehicle addmagazine "38Rnd_FFAR"; ~3 _vehicle addmagazine "2Rnd_Sidewinder_AH1Z"; ~3 _vehicle addmagazine "100Rnd_762x51_M240"; ~3 _vehicle setdamage 0; ~3 _vehicle setfuel 1; ~3 How do i make the script recongnize what vehicle is what to load the correct ordinance only on the correct aircraft? Also can it be scripted that i have to sit completely still for 5 seconds in the trigger before it reloads any ordinance? If so may i get some guidance on how to do so. If you guys can point me in the right direction i would be very appreciative! Thanks Share this post Link to post Share on other sites
[aps]gnat 29 Posted July 25, 2009 Gday! Command you need is TypeOf http://community.bistudio.com/wiki/typeOf Like; _AirC = nearestobject [_deck, "Plane"] ?(typeof _AirC == "A10") : goto "A10Arm" "Plane" is a base class name and A10 is an actual vehicles class name "Helicopter" is another base class name you might use. More vehicle class names can be found here; http://forums.bistudio.com/showthread.php?t=73241 Share this post Link to post Share on other sites