EnhancedItems/EnhancedAmmo
This class is part of the EnhancedItems package by Wormbo.
EnhancedAmmo classes can use the EnhancedItems death messages and they can specify, how they should be regenerated. This is used e.g. by the Relic of Wealth from the Enhanced Relics mutator in the Enhanced Items mod or the Ammo Regen relic in Q3T.
Properties
- bool bIsSuperWeapon
- This ammo belongs to a super weapon.
- /EIDeathMessageMutator EIDMM
- This variable contains a reference to the /EIDeathMessageMutator responsible for displaying the enhanced death messages. The mutator automatically sets this value through a SpawnNotify subclass.
- name IdenticalTo
- Used by the OtherIsA() and ClassIsA() functions in various EnhancedItems base classes to identify an actor or class as being similar to this one. For example, the ERelicDeathInventory class (the Relic of Death pickup of the Enhanced Relics mutator) has IdenticalTo=RelicDeathInventory. This will cause OtherIsA(aPickup, 'RelicDeathInventory') to return True not only for actual subclasses of RelicDeathInventory, but also for the ERelicDeathInventory and any other EnhancedItems-based classes that have IdenticalTo=RelicDeathInventory in their default properties.
- RegenSuggestion SuggestedRegeneration
- Specifies how this ammo should be regenerated. (see below) This is not used by the ammo itself, but can help other mods to find a good relation between different ammo types' regeneration cycles.
Structures
RegenSuggestion
Describes a way to regenerate this type of ammo.
- int Amount
- How much ammo should be regenerated per cycle.
- int Interval
- How long the cycle should be relative to other ammo types' cycles.
- int Max
- Specifies the maximum amount of ammo that should be regenerated. This can be different from the default or maximum amount.
Methods
- bool ClassIsA(class aClass, coerce string DesiredType)
- Returns, whether a class is of a specific type or identical to that type. (see IdenticalTo property)
- bool OtherIsA(Actor (UT) Other, name DesiredType)
- Returns, whether an actor is of a specific type or identical to that type. (see IdenticalTo property)
You may find the following two functions useful when creating Volatile Ammo pickups, i.e. ammo packs that explode when damaged.
- RestoreKillType( )
- Reverts the effect of SetKillType(). Call this exactly as often as SetKillType() after doing damage or directly killing players.
- SetKillType(bool bSplashHit, bool bHeadHit, class<Actor (UT)> DamageProjectileClass)
- Prepares the specified /EnhancedWeapon or /EnhancedProjectile class' death messages to be used when a player is killed. Call this function before you damage or kill a player and revert its effect after you're done.