Author: =Mason=
Author Website:

Requirements: No addons required

Version: 2.0 update

Short description: This script gives the player the ability to repair vehicles if a few requirments are met.
Date: 2012-11-29 10:02
Submitted by: =Mason=


Comments: (0)
Rating:



 



HOG Mechanic

by
=Mason=


Description:
This script gives the player the ability to repair vehicles if a few requirments are met.

How it works:
Once the engineer grabs a laser designator he can then go to the "mechanic_shed" and select get repair skill option
he can now repair a damaged vehicle once if he still holds the laser designator.

After he has used his repair he can return to the "mechanic_shed" at base to get another repai skill
this can be done as often as he needs.

Requirments:
1) player is an engineer
2) player has a laser designator
3) player has gone to the Mechanic shed and selected the get repair skill option.


Installation / Usage:
First you need an object on the map named "mechanic_shed" and place the following in the init field:
this addAction ["get repair skill", "HOG_scripts\HOG_Mechanic\mechanic_replenish.s qf"];
then transfer the HOG_scripts folder over to your mission folder and place the following in your init.sqf:
// HOG_mechanic start and Public Variable
if ! isdedicated then {repair_allowed = 0;};
[player] execVM "HOG_scripts\HOG_mechanic\repair.sqf";

Setting u list of engineers / using wth unit mods:
TO add different engineer classnames simply open up HOG_scripts\HOG_mechanic repair.sqf and at the top you will find:
_crewType = ["USMC_SoldierS_Engineer","US_Soldier_Engineer_EP1" ,"BAF_Soldier_EN_W", 
"BAF_Soldier_EN_DDPM","BAF_Sol dier_EN_MTP","Soldier_Engineer_PMC","CDF_Soldier_E ngineer"];
now this has all standalone engineer classnames but if you need more just add them in to the _crewType array.

Adding a different weapon that is needed for the usage of the script:
Sadly Arma 2 standalone does not have any tool weapons well that i know of so i had to use the laserdesignator well that is all i could think of any way if you whish to change this to a different weapon or you have a addon just simply follow these 2 steps:
    1) open repair.sqf and change line 12 "if (player hasWeapon "Laserdesignator") then"
    2) open mechanic_replenish.sqf and change line 11 "if (_per hasWeapon "Laserdesignator") then"
that is it.


Known Issues:
None


Future plans:
1) Going to make the amount of skills recieved at the "mechanic_shed" selectable via Mission Paramaters
2) Add amount of damage vehicle has before engineer can repair the vehicle
and a few more still thinking.


Credits & thanks:
thanks to the community on BIS Forums for helping me to get my knowledge of Arma 2 scripting.

Also some of the code in the repair.sqf was found online but sadly i dont remember who was the
designer nor can i find it again so who ever you are cheers mate.


Changelog:
v2.0 update
- fixed a missing error 30/11/2012

v2.0
- Changed from player needing a laserdesignator to use repair and refuel to player needing a spare tyre to repair and a Fuel can to refuel.
- Fixed a variable issue
- Sepperated Repair and Refuel to 2 seperate events.


Forum topic:
- BI forums




Download from FTP #1:
HOG Mechanic
Download from FTP #2:
HOG Mechanic
Download from FTP #3:
Size : 1 MB   Downloaded : 179 times     Report broken download link



Tags: No tags