Skip to content

Ammo Pattern

BDCarrillo edited this page Jan 24, 2022 · 3 revisions

Snippet

            Pattern = new PatternDef
            {
                Patterns = new[] { // If enabled, set of multiple ammos to fire in order instead of the main ammo.
                    "",
                },
                Mode = Fragment, // Select when to activate this pattern, options: Never, Weapon, Fragment, Both 
                TriggerChance = 1f, // This is %
                Random = false, // This randomizes the number spawned at once, NOT the list order.
                RandomMin = 1, 
                RandomMax = 1,
                SkipParent = false, // Skip the Ammo itself, in the list
                PatternSteps = 1, // Number of Ammos activated per round, will progress in order and loop. Ignored if Random = true.
            },

Variable Descriptions

Patterns

  • This is an array where you list each AmmoRound you want in the pattern
  • You can have as many as you want:
Patterns = new[] {
    "YourAmmoRoundName1",
    "YourAmmoRoundName2",
    "YourAmmoRoundName3",
    "YourAmmoRoundName4",
},

Mode

  • Enables the pattern for the weapon, fragments, both, or none

TriggerChance

  • The chance that the pattern will play. [0 to 1, and any floating point number in-between]
  • If the pattern isn't triggered, the parent ammo will fire or the fragment ammo listed in fragment will spawn

Random

  • On each fire, pick a random number of ammos spawned at once

RandomMin and RandomMax

  • (With random on) This is the RANGE of ammos that is available to the random ammo picker.

SkipParent

  • Does not apply to mode=fragment
  • On fire, skip the ammo that the pattern originated from.
  • If false, it is included in the random ammo selection
Clone this wiki locally