Jump to content

Fogazi

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About Fogazi

  • Rank
    Private
  1. Fogazi

    AddItem still working?

    The ToolKit at the front is not supposed to be there. I was just using it to show the capitalisation. I should have wrote it differently
  2. Fogazi

    AddItem still working?

    ToolKit (unitBackpack this) addItemCargo ["ToolKit", 1]; Capitalise both T and K
  3. Is there a way I can see class names myself without having to use this site? Ie in a config file or something?
  4. Fogazi

    Repair Script

    ... I wasn't aware capitalisation was so important. Thank you that worked. Now does anyone have a good animation they can recommend?
  5. Fogazi

    Repair Script

    Ok, got the _unit code sorted. The Toolkit is still not getting picked up/recognised??? It works if I substitute the toolkit with a firstaid kit. And use backpackItems
  6. Fogazi

    Repair Script

    Nope, I can get it to work with other items but can't seem to get it to work with a Toolkit..
  7. Fogazi

    Repair Script

    I can get the sleep command to work a no problems. But I cannot work out how to get an animation to work at all.. ---------- Post added at 12:11 ---------- Previous post was at 11:07 ---------- Ok nearly got it all sorted by myself. With a few creases to iron out. What I have now is: // // Call repair.sqf with: this addAction["Repair Vehicle","repair.sqf"]; // _vehicle = (nearestObjects [player, ["B_Hunter_F"], 5]); //Checks if Ifrit or Hunter are within 5m _veh = _vehicle select 0; // selects the nearest vehicle and puts it in '_veh' _vehDamage = getDammage _veh; //Puts the damage of '_vehicle' in the variable '_veh' IF (count _vehicle == 1) // If there is one vehicle within 5m THEN { IF (vehicle player == player) //If player is not inside vehicle THEN {player playActionNow "medicStart"; sleep 10; _vehDamage = _veh setDamage 0; player playActionNow "medicStop";} // Start repair animation with a 10 second delay then set the damage to 0% ELSE {hint "You cannot repair from inside the vehicle";}} ELSE {hint "You are too far away from the vehicle";}; // Else show "You are too far ...." exit; This now uses and animation with a 10 sec delay. It also doesn't allow you to repair from inside the vehicle. One more thing I need to work out is how to make the player require a toolbox in their pack. I'm sure it is simple but I am just figuring out the commands. ---------- Post added at 13:52 ---------- Previous post was at 12:11 ---------- I now have this: IF ("Toolkit" in (itemCargo player)) //Check if player has a Toolkit THEN {player playActionNow "medicStart"; sleep 10; _vehDamage = _veh setDamage 0; player playActionNow "medicStop";} ELSE {hint "You need a Toolkit to repair a vehicle";} However even though I have a Toolkit in my inventory it still does not work. I have also tried (items player) without success. Any ideas? I have searched without much success for code to check players for items...
  8. Fogazi

    Repair Script

    Thank you, where in the code should i place these lines? Before the {_vehDamage = _veh setDamage 0;}? That way the animation and pause should happen first and then the vehicle is repaired after?
  9. Hello, I want to use a repair script that is executed by a player. Not by driving a vehicle onto a pad/repair bay. I am currently using this script which is very basic, but effective. // // Call repair.sqf with: this addAction["Repair Vehicle","repair.sqf"]; // _vehicle = (nearestObjects [player, ["O_Ifrit_F","B_Hunter_F"], 5]); //Checks if Ifrit or Hunter are within 5m _veh = _vehicle select 0; // selects the nearest vehicle and puts it in '_veh' _vehDamage = getDammage _veh; //Puts the damage of '_vehicle' in the variable '_veh' IF (count _vehicle == 1) // If there is one vehicle within 5m THEN {_vehDamage = _veh setDamage 0;} // Then set the damage to 0% ELSE {hint "You are too far away from the vehicle";}; // Else show "You are too far ...." exit; Now this works fine but I would like to have an animation or at least a delay while the "player" is "repairing" the vehicle to add more realism to the action. I also want to make it so that the script is not available when inside the vehicle. And one more, I would like this script only to execute if the player is holding a toolbox in his inventory. I have only just started scripting with Arma so take it easy on me. Alternatively if there is a better script out there that works better could you please direct me to it. Thank you
×