Help me code this freeking thing to repair / re-ammo
Posted: Thu Aug 19, 2010 5:22 pm
I have a APC (interstate.. CSM)
It should repair and top up ammo nearby vehicles..
Currently it does repair vehicles on the same team but I have issues with the ammo.
Primary fire is the stratos 'thrusters' (a weapon..) and secondary is the nitro (a weapon..)
the APC will topup the primary but not secondary.. I think maybe I have over complicated the code anyway but its confusing me. I want this beast to just repair/reammo anything. do I have to add vehicle type or can I have it repair anything?
It should only work for vehicles on the same team.. although by adding a vehicle type I guess that does that anyway? (each team has an APC and the stratos vehicles.. thats it. but I have made 4 seperate vehicles.. a stratos for each team and an APC.. named stratosvigi, stratosking, suburban and suburban2.
code below is just for suburban. equivalent required for suburban2
Its not correct atm, thats for sure.
Too confused now looking at it.
It should repair and top up ammo nearby vehicles..
Currently it does repair vehicles on the same team but I have issues with the ammo.
Primary fire is the stratos 'thrusters' (a weapon..) and secondary is the nitro (a weapon..)
the APC will topup the primary but not secondary.. I think maybe I have over complicated the code anyway but its confusing me. I want this beast to just repair/reammo anything. do I have to add vehicle type or can I have it repair anything?
It should only work for vehicles on the same team.. although by adding a vehicle type I guess that does that anyway? (each team has an APC and the stratos vehicles.. thats it. but I have made 4 seperate vehicles.. a stratos for each team and an APC.. named stratosvigi, stratosking, suburban and suburban2.
code below is just for suburban. equivalent required for suburban2
Its not correct atm, thats for sure.
Too confused now looking at it.
Code: Select all
rem repair and ammo stuff ******************************
ObjectTemplate.addTemplate CarRepairpointvigi
ObjectTemplate.setPosition 3.3/0/0
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.create SupplyDepot CarRepairpointvigi
ObjectTemplate.radius 10
ObjectTemplate.team 0
ObjectTemplate.addVehicleType stratosvigi -1 10 0
ObjectTemplate.AddAmmoType 0 -1 10 0
ObjectTemplate.workOnVehicles 1
ObjectTemplate.workOnSoldiers 0
ObjectTemplate.loadSoundScript ../../../Common/Sounds/SupplyDepot_vehicle.ssc
ObjectTemplate.addTemplate AmmoboxSupplyDepot
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate AmmoboxVehicleSupplyDepot
ObjectTemplate.setPosition 0/0/0
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.create SupplyDepot AmmoboxSupplyDepot
ObjectTemplate.radius 10
ObjectTemplate.team 0
ObjectTemplate.setHealth 0 0 0
ObjectTemplate.addAmmoType 1 -1 15 0
ObjectTemplate.addAmmoType 2 -1 1.2 0
ObjectTemplate.addAmmoType 3 -1 1.2 0
ObjectTemplate.workOnVehicles 0
ObjectTemplate.workOnSoldiers 1
ObjectTemplate.loadSoundScript ../../../Common/Sounds/SupplyDepot.ssc
rem *** AmmoboxVehicleSupplyDepot ***
ObjectTemplate.create SupplyDepot AmmoboxVehicleSupplyDepot
ObjectTemplate.radius 10
ObjectTemplate.team 0
ObjectTemplate.setHealth 0 0 0
ObjectTemplate.addAmmoType 0 -1 20 0
ObjectTemplate.addAmmoType 1 -1 20 0
ObjectTemplate.addAmmoType 2 -1 20 0
ObjectTemplate.addAmmoType 3 -1 20 0
ObjectTemplate.workOnVehicles 1
ObjectTemplate.workOnSoldiers 0
ObjectTemplate.loadSoundScript ../../../Common/Sounds/SupplyDepot.ssc