Rusted Warfare Mod Workshop
All coursesCreative tools中文

Follow a shot from turret to projectile

Understand target permissions, range, fire interval and projectile references

Set target permissions first

A turret still needs the attack section to permit its target category, this sample attacks ground targets only, start testing against enemy ground units

[attack]
canAttack: true
canAttackFlyingUnits: false
canAttackLandUnits: true
canAttackUnderwaterUnits: false
maxAttackRange: 150
shootDelay: 1s

Reference a defined projectile

projectile:shell refers to the projectile_shell section, use only the suffix in the reference and update both ends when renaming it

[turret_main]
x: 0
y: 0
projectile: shell

[projectile_shell]
directDamage: 18
life: 1.5s
speed: 4
drawSize: 1
color: #FFE1B0

Tune damage and rate separately

Damage changes each hit while shootDelay changes the interval between shots, try 24 damage with the same interval, then compare 1s and 1.5s separately, actual output also depends on hits and armor

Allow enough projectile lifetime

A short life can remove a projectile before it arrives, keep the sample lifetime and speed while testing near maximum range, increasing range alone can create targets the projectile cannot reach

Try it yourself

Make the guard fire slower with heavier hits and record time to defeat a fixed target

Open interactive lesson and download the companion mod