Skip to content

Salvage crate pickup edge case #111

Description

@ThePredatorBG

I have a salvage crate object that is meant just for weapon upgrades. Level and money chances are zero. However, I want vehicles not to pick up the crate if they already have max salvage, and therefore all units that cannot gain salvage too.
The crates have nothing else to give on pickup, but salvaged tanks make them disappear when they run over them (because they are valid pickers and the game logic tries to give them level and money, which have 0 chances).
Maybe as a new parameter so as to preserve vanilla behavior if desired, like PickupOnNoEffect = Yes/No.

Behavior = SalvageCrateCollide ModuleTag_02
    ForbiddenKindOf = PROJECTILE HULK INFANTRY STRUCTURE EMP_HARDENED
    PickupScience = SCIENCE_GLA
    ExecuteFX = FX_SalvageCratePickup ; FXList to play when sucessfully picked up
    WeaponChance = 100% ;If we are WeaponSalvager, this is the chance we get a WeaponSet upgrade if not fully upgraded
    LevelChance = 0% ; Either we are just a regular Salvager, or we are fully upgraded. This is the chance we gain a level
    MoneyChance = 0% ; And this is the chance we get money. Level + Money = 100%. Weapon is an idependant FirstChance
    MinMoney = 0                ; If we get money, this is how much we get.  Make them different to get a random range.
    MaxMoney = 0
  End

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions