rem -------------------------------------------------------------------------
rem -------------------------------------------------------------------------

Wizard.create "Apply tank engine"

Wizard.beginAnalyzer
Wizard.populate IS Engine
Wizard.endAnalyzer

Wizard.warning "Apply Default Tank Engine Settings"
Wizard.category Tank
Wizard.type Utility
Wizard.affectAll 1

Wizard.beginResolution
ObjectTemplate.active #OBJECT
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.setMinRotation -1/0/-1
ObjectTemplate.setMaxRotation 1/0/1
ObjectTemplate.setMaxSpeed 40/0/10
ObjectTemplate.setAcceleration 40/0/10
ObjectTemplate.setInputToYaw PIYaw
ObjectTemplate.setInputToRoll PIThrottle
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setEngineType c_ETTank
ObjectTemplate.setTorque 3.5
ObjectTemplate.setDifferential 3.5
ObjectTemplate.setNumberOfGears 5
ObjectTemplate.setGearUp 0.95
ObjectTemplate.setGearDown 0.45
ObjectTemplate.setGearChangeTime 0.05
Wizard.endResolution

rem -------------------------------------------------------------------------
rem -------------------------------------------------------------------------

Wizard.create "Init Turret"

Wizard.beginAnalyzer
Wizard.populate IS RotationalBundle
Wizard.endAnalyzer

Wizard.warning "Make object to Turret"
Wizard.category Tank
Wizard.type Utility
Wizard.affectAll 1

Wizard.beginResolution
Wizard.selectObject "Select object to make turret" 
ObjectTemplate.active #STRING
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.setMaxSpeed 60/0/0
ObjectTemplate.setAcceleration 200/0/0
ObjectTemplate.setInputToYaw PIMouseLookX
Wizard.break
Wizard.endResolution

rem -------------------------------------------------------------------------
rem -------------------------------------------------------------------------

Wizard.create "Init Main Cannon"

Wizard.beginAnalyzer
Wizard.populate IS FireArms
Wizard.endAnalyzer

Wizard.warning "Make object to Cannon"
Wizard.category Tank
Wizard.type Utility
Wizard.affectAll 1

Wizard.beginResolution
Wizard.selectObject "Select object to make main cannon:" 
ObjectTemplate.active #STRING
ObjectTemplate.setNetworkableInfo BasicInfo
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.hasResponsePhysics 1
ObjectTemplate.projectileTemplate Tankbullet
ObjectTemplate.projectilePosition -0.1/0/4
ObjectTemplate.magSize -1
ObjectTemplate.numOfMag 1
ObjectTemplate.velocity 200
ObjectTemplate.reloadtime 0.2
ObjectTemplate.recoilSpeed 8
ObjectTemplate.recoilSize 8
ObjectTemplate.roundOfFire 0.52
ObjectTemplate.fireingForce 20
ObjectTemplate.timeToNotAllowChange -1
ObjectTemplate.addTemplate e_muzzle_smal_modern
ObjectTemplate.setPosition 0/0/3
ObjectTemplate.setRotation -180/0/0
Wizard.break
Wizard.endResolution


Wizard.create "Apply default tank armor component"

Wizard.beginAnalyzer
Wizard.populate IS PlayerControlObject
Wizard.endAnalyzer

Wizard.warning "Apply Default Amor Component Settings"
Wizard.category Tank
Wizard.type Utility
Wizard.affectAll 1

Wizard.beginResolution
ObjectTemplate.createComponent Armor
ObjectTemplate.armor.maxHitPoints 1000
ObjectTemplate.armor.hitPoints 1000
ObjectTemplate.armor.defaultMaterial 72
ObjectTemplate.armor.hpLostWhileUpSideDown 100
ObjectTemplate.armor.hpLostWhileInDeepWater 335
ObjectTemplate.armor.hpLostWhileCriticalDamage 18
ObjectTemplate.armor.waterDamageDelay 0
ObjectTemplate.armor.deepWaterDamageDelay 0
ObjectTemplate.armor.waterLevel 0.3
ObjectTemplate.armor.deepWaterLevel 0.8
ObjectTemplate.armor.explosionForce 15
ObjectTemplate.armor.explosionForceMod 8
ObjectTemplate.armor.explosionForceMax 5000
ObjectTemplate.armor.explosionDamage 300
ObjectTemplate.armor.explosionRadius 7
ObjectTemplate.armor.explosionMaterial 99
ObjectTemplate.armor.wreckExplosionForce 50
ObjectTemplate.armor.wreckExplosionDamage 30
ObjectTemplate.armor.wreckExplosionRadius 5
ObjectTemplate.armor.wreckExplosionMaterial 70
ObjectTemplate.armor.wreckHitPoints 1000
ObjectTemplate.armor.timeToStayAsWreck 10
ObjectTemplate.armor.criticalDamage 101
ObjectTemplate.armor.hideChildrenOnSpectacularDeath 1
Wizard.break
Wizard.endResolution