Skip to main content

Scrap Tossers

Holds up to 3 ammo.

Stuns enemies on hit.

Restores 1 ammo whenever an enemy is killed.

Implementation​

Scrap Tossers is a one-state Skill. While it is cast it locks onto the closest enemy in sight and throws at it; with nobody in sight it throws where you aim. Clicks still move the character during the cast.

ScrapTossers — Skill Model Normal
Skill Model Normal: ScrapTossers
Caster:Skill_ScrapTossers_Casting
Targeter:Skill_ScrapTossers_Targeting
Use Blocker Stat:ScrapTossers_UseBlockers
On Use:OnUse
While Casting:WhileCasting
On Cast End:OnCastEnd

The targeter is a skill shot that spawns the throw from the body, facing the way the body faces, so the throw goes wherever the cast turned the character.

ScrapTossers_Targeting — Skill Targeting Skill Shot
Skill Targeting Skill Shot: ScrapTossers_Targeting
Skill Prefab:ScrapTossers_Forward
Use Pooling:true
Projectile Position:OffsetToSourceBody
Projectile Rotation:OffsetToSourceBody
Projectile Layouter:Forward

While casting, the Skill picks its target and turns toward it. SetLockOnTarget writes the closest living enemy in sight into LockOnTarget (nobody: empty). A Conditional Effect then locks on when there is a target, and otherwise aims at the pointer. RotationInputBlock keeps the facing from changing while you walk. All three are Temporary, so they stop with the cast.

WhileCasting — Effect Pack
Effect Pack: WhileCasting
Actor Stat Effect (BS): SetLockOnTarget
Target Stat:Movement / Actor / LockOnTarget
Processor:Set_Actor
Conditional Effect: IfLockOnTarget_LockOnElseAimToPointer
Apply Type:Temporary
Int Stat Effect (BS): RotationInputBlock
Target Stat:Movement / IntClamped / RotationInputBlocker
Value:1
Processor:Add_Int
Apply Type:Temporary
IfLockOnTarget_LockOnElseAimToPointer — Conditional Effect
Conditional Effect: IfLockOnTarget_LockOnElseAimToPointer
Condition:LockOnTarget is not null
Then:LockOn
Else:AimToPointer
Apply Type:Temporary

Ammo​

Ammo is the ScrapTossers_AmmoCount Stat, clamped to 0–3 and defaulting to 3. On each use, SpendAmmo applies -1.

ScrapTossers_AmmoCount — Stat (Clamped Int)
Stat (Clamped Int): ScrapTossers_AmmoCount
Stat Key:ScrapTossers / IntClamped / AmmoCount
Default:3
Max:3

To block the Skill while empty, Add1_AmmoEq0 injects +1 into the Skill's UseBlockers Stat whenever AmmoCount equals 0 — the same pattern the cooldown uses. The Skill cannot be used again until ammo is available.

ScrapTossers_UBs — Stat (Clamped Int)
Stat (Clamped Int): ScrapTossers_UBs
Stat Key:ScrapTossers / IntClamped / SkillUseBlockers
Relation: Cooldown:ScrapTossers_Cd
Injectors [0]:Add1IfCdGT0
Injectors [1]:Add1_AmmoEq0
Allow Exceed:true
Max:1

Attack​

ThorwableObjects_Attack applies two Effects on hit: Damage (a flat -50 to Health) and Stun, which adds 1 to the target's Stun Stat for 2 seconds.

ThorwableObjects_Attack — Effect Pack
Effect Pack: ThorwableObjects_Attack
Int Stat Effect (BS): Stun
Target Stat:Default / IntClamped / Stunned
Value:1
Apply Type:Temporary
Float Stat Effect (MAS): Damage
Target Stat:Default / FloatClamped / Health
Value:-50
Processor:Standard_Float

Restoring ammo on kill​

KillToAmmoCounterInjector injects a CounterEffect into the enemy's CounterKillEffects Stat through KillToAmmoCounter, tracking the lethal Effects dealt by this weapon. When an enemy dies, IncreaseAmmoCount adds 1 back to AmmoCount.

KillToAmmoCounter — Stat (CounterEffect Signed)
Stat (CounterEffect Signed): KillToAmmoCounter
Stat Key:ScrapTossers / CounterEffect_Signed / KillToAmmoCounter
Targeting Environment Id:Default
Trigger On:Applied
Default: KillToAmmoCounter
Int Stat Effect (BS): IncreaseAmmoCount
Target Stat:ScrapTossers / IntClamped / AmmoCount
Value:1
Processor:Add_Int

When the cast ends, Cooldown adds 0.5 seconds to the Skill's cooldown.