Games 1 Posted February 7, 2015 This script keeps track of your Vehicle Ammo during the mission. The script is calling for information from the P0-30 Orca for the mission, it tracks ammo for the "LMG_Minigun" and "missiles_DAGR". When the condition is met i.e "_current/_max < 0.5", it will redirect your current mission waypoint to a resupply area. However, I am trying to change the script so that it only tracks the Missles. the Helicopter I would like swap it for doesn't have a minigun. I have exhausted my incredibly limited knowledge and innumerable attempts and have to reach out. Here's what the Script looks like for the Orca. //store helicopter starting ammo /* { ["%1 = %2",_x, Bis_Heli ammo _x] call Bis_debugLogF; Bis_Heli setVariable [_x, Bis_Heli ammo _x]; } forEach (weapons Bis_Heli); */ /* [5624] string "Debug >> LMG_Minigun = 2000" [5624] string "Debug >> missiles_DAGR = 12" */ //start ammo monitoring thread [] spawn { private["_max","_current","_bullets","_missiles","_progress","_currentTask"]; _missiles = Bis_Heli ammo "missiles_DAGR"; _bullets = Bis_Heli ammo "LMG_Minigun"; _max = (_missiles * 200) + _bullets; while {!Bis_MissionAborted} do { //detect helicopter is running low on ammo || player is sent to resupply waitUntil { sleep 3; _missiles = Bis_Heli ammo "missiles_DAGR"; _bullets = Bis_Heli ammo "LMG_Minigun"; _current = (_missiles * 200) + _bullets; ((_current/_max < 0.5) || (Bis_SendToRessuply)) }; //play the conversation & do the task stuff, if not send there by if !(Bis_SendToRessuply) then { ["LOW_ON_AMMO"] call BIS_fnc_missionConversations; waitUntil { sleep 0.3; ([bis_Heli,Bis_HelipadCampRogain,20] call BIS_hasLanded) }; } else { waitUntil { sleep 0.3; ([bis_Heli,Bis_HelipadCampRogain,20] call BIS_hasLanded) && (Bis_LandedAtRogainPlayed) }; }; [] call Bis_resupply; sleep 1; if !(Bis_SendToRessuply) then { Share this post Link to post Share on other sites
Games 1 Posted February 7, 2015 I've focused mainly on the data that pertains to the weapons themselves. My initial attempts were to Just delete the LMG_minigun entirely from the Script. But the script is still braking down during initialization. I'm am thinking that it's most likely the classname of the Missles launcher? But if it were not, How can I be sure that just deleting all the minigun data is correct, I'm not even sure how the thread that "stores helicopter starting ammo" is correct after eliminating minigun input? I'll crossout what I've deleted from the script shown here: //store helicopter starting ammo /* { ["%1 = %2",_x, Bis_Heli ammo _x] call Bis_debugLogF; Bis_Heli setVariable [_x, Bis_Heli ammo _x]; } forEach (weapons Bis_Heli); */ /* [s][5624] string "Debug >> LMG_Minigun = 2000"[/s] [5624] string "Debug >> missiles_DAGR = 12" */ //start ammo monitoring thread [] spawn { private["_max","_current",[s]"_bullets"[/s],"_missiles","_progress","_currentTask"]; _missiles = Bis_Heli ammo "missiles_DAGR"; [s]_bullets = Bis_Heli ammo "LMG_Minigun";[/s] _max = [s]([/s]_missiles[s] * 200) + _bullets[/s]; while {!Bis_MissionAborted} do { //detect helicopter is running low on ammo || player is sent to resupply waitUntil { sleep 3; _missiles = Bis_Heli ammo "missiles_DAGR"; [s]_bullets = Bis_Heli ammo "LMG_Minigun";[/s] _current = [s]([/s]_missiles[s] * 200) + _bullets[/s]; ((_current/_max < 0.5) || (Bis_SendToRessuply)) }; Share this post Link to post Share on other sites