ah i see
Ya dont need a trigger m8
In the init sqs enter the following lines
repairarray = [object XXXX,object yyyy,object zzzz]
[]exec "repair.sqs"
and then create the following script run on all machines
(It simply loops repairing everything back to 0 on each circuit
;;Repair.sqs
;;damagecontrol
;;used to keep vital objects in good repair, eg ammocrates, medtents etc
;;objects in damconarray are stated in init.sqs
~10
#START
~2
{_x Setdammage 0} forEach repairarray
goto "START"
or if it is only used to repair 1 object then you could use the following, without creating the array in the init.sqs, just activating the script
;;Repair.sqs
~10
#START
@ getdammage (object XXXX) > 0.1
(Object XXXX) Setdammage 0
goto "START"
Ideally you would use the array system and you would add the names of all your ammo crates and med tents to it
eg
Repairarray = [Ec1,Ec2,Wc1,Wc2,Object XXX,Object YYY]
The only problem i find when trying to repair an object that is placed on the island by the hardcoding is that if you immediately set its dammage to 0 from heavy damage it will not look repaired
However what you can do is something like the following
#START
@ getdammage (object XXXX) > 0.5
~0.2
(Object XXXX) Setdammage 0.4
~0.2
(Object XXXX) Setdammage 0.3
~0.2
(Object XXXX) Setdammage 0.2
~0.2
(Object XXXX) Setdammage 0.1
~0.2
(Object XXXX) Setdammage 00
~0.2
(Object XXXX) Setdammage 0
goto "START"
This will as you can see repair it in stages and the end product will be a cosmetically repaired building as well
Dont worry about the cpu usage of the @ sign, as it is beiung run on your client iy wont cause any noticeable strain on your machine unless you have lots more @ commands in your scripts