Table of Contents

Class AbilitySpawnMultiplyAction

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

Action that multiplies the spawn of an ability, creating multiple instances of the ability object. This is typically used to spawn several copies of a projectile or effect at once.

[Serializable]
public class AbilitySpawnMultiplyAction : BaseAction, IAction
Inheritance
AbilitySpawnMultiplyAction
Implements
Inherited Members

Fields

MaximumSpawnCount

Hard ceiling on how many copies one spawn event may produce.

public const int MaximumSpawnCount = 30

Field Value

int

Remarks

The count comes from an authored value provider, and several of those are computed — StatScaledValue reads a character attribute, RandomRangeValue draws a number. Nothing bounded the result, so a provider wired to a stat that scales with gear would instantiate that many GameObjects on every peer, per cast, and a mis-authored range could do it by accident.

Thirty is far above any shotgun or nova a designer would author and far below a number that costs a frame. It is a backstop, not a tuning knob: an ability that legitimately wants more should say so here rather than through a provider nobody checks.

SpawnCountValue

The value provider that determines how many times to spawn (duplicate) the ability object.

[Tooltip("The value provider that determines how many times to multiply the ability object.")]
[SerializeReference]
public IIntValueProvider SpawnCountValue

Field Value

IIntValueProvider

Methods

Execute(ICharacter, EventData)

Spawns multiple copies of the initial ability object, each with the same properties as the original.

public override void Execute(ICharacter initiator, EventData eventData)

Parameters

initiator ICharacter

The character initiating the action.

eventData EventData

The event data containing ability spawn information. Must be of type AbilitySpawnEventData.