EtG Modding Guide
  • ETG Modding Guide
  • Getting started
    • Modding EtG: Installing Mods
    • Modding EtG: Creating a Mod
    • Uploading a Mod
    • Useful Tools
      • Using IlSpy
  • Making An Item
    • Creating A Passive
    • Creating An Active
    • Creating An Ammolet
    • Creating A Guon
    • Synergies
  • Making a Gun
    • Creating A Gun
      • Setting Up Gun Sprite Folders
      • Creating Gun Jsons/Jtk2ds
        • Pixel Measurement Conversions
    • Setting Up Projectiles
      • Adding Components To A Projectile
      • Projectile HitEffects (Visual Effects)
      • Adding status effects to a projectile
    • Continuous Fire Animations
    • Gun Ammo Types
  • Custom Characters
    • Creating A Standalone Custom Character
  • Making a Floor
    • Introduction
    • Setup
    • Making The Dungeon
    • Tileset
    • Rooms
    • Making the flow
    • Making the Entrance
    • All Files
  • Text, Text Boxes, Etc
    • Textboxes
    • Text Formatting
  • Sounds
    • Using Custom Sounds
    • Customising Gun Sounds
    • Basegame Sound List
    • wwise Sound Dump
  • Misc
    • Making Asset bundles
    • Assetbundles: How-To
    • How to create a hook
    • Creating A Command
    • Subscribing Methods to Actions
    • Reversing Player Controls
    • Undodgeable Projectiles
    • Creating An Enemy
  • Shaders
    • Creating Shaders
  • All things Spriting
    • Important Sprite Creation Information.
    • Importing a Sprite To Visual Studios
  • Monobehaviour Documentation
    • BounceProjModifier
    • PierceProjModifier
    • KeyProjModifier
    • CompanionFollowPlayerBehaviour
  • Various Lists of IDs, Sounds, Etc.
    • List of Item and Gun IDs
    • Enemy Guids
    • List of Base Game Synergies
    • dfSpriteList
    • All Custom Ammo Types
    • Gun .Json Dump
  • OFF TOPIC MEMES
    • Modders Anthem
Powered by GitBook
On this page
  • Public Variables
  • Private Variables
  • Actions and Funcs

Was this helpful?

  1. Monobehaviour Documentation

BounceProjModifier

BounceProjModifier is the basic component that causes projectiles to ricochet upon hitting obstacles. It is intended to be applied to projectiles.

Both player projectiles and enemy projectiles use this component to handle their ricochets.

Public Variables

Name

Type

Notes

Default Value

numberOfBounces

int

Controls how many times the projectile is allowed to ricochet.

1

chanceToDieOnBounce

float

Set to a number between 0 and 1, where 0 is 0% and 1 is 100%. Adds a percentage chance for the projectile to, in fact, not bounce upon hitting an obstacle even when the component is present and not all of it's bounces have been used up.

0f

percentVelocityToLoseOnBounce

float

Set to a number between 0 and 1, where 0 is 0% and 1 is 100%. Upon bouncing, the projectile loses speed equal to the specified percentage of it's original velocity.

0f

damageMultiplierOnBounce

float

The projectile's damage is multiplied by this value upon ricocheting.

1f

usesAdditionalScreenShake

bool

Determines whether or not the projectile will trigger the screenshake effect stored in 'additionalScreenShake' upon ricochet.

false

additionalScreenShake

ScreenShakeSettings

Parameters for the screenshake effect that will be triggered upon bounce if 'usesAdditionalScreenShake' is set to true.

null

useLayerLimit

bool

unknown

false

layerLimit

CollisionLayer

unknown

PlayerHitBox

ExplodeOnEnemyBounce

bool

If the parent projectile has an ExplosiveModifier component, and this variable is set to true, then projectiles will not ricochet off enemies and will instead explode on them. Does nothing if the projectile does not have an ExplosiveModifier component.

false

removeBulletScriptControl

bool

If the parent projectile is a part of a Bullet Script and this variable is set to true, then the bullet script will cease to control the projectile's motion after a ricochet.

true

suppressHitEffectsOnBounce

bool

If set to true, then the projectile will not trigger any of it's regular impact visual effects upon bouncing.

false

onlyBounceOffTiles

bool

If set to true, then the projectile will not ricochet off of enemies or other objects, only bouncing off walls.

false

bouncesTrackEnemies

bool

If set to true, then instead of projectiles bouncing along a logical vector from their impact direction, they will instead bounce towards the nearest AIActor in a radius determined by 'bounceTrackRadius'.

false

bounceTrackRadius

float

Determines the radius within which 'smart' bounces can target enemies if 'bouncesTrackEnemies' is true.

5f

TrackEnemyChance

float

Set to a number between 0 and 1, where 0 is 0% and 1 is 100%. Determines the chance for projectiles to 'smart' bounce towards the nearest AIActor if bounceTrackRadius is true. (Eg: if set to 0.5f, projectiles will only have a 50% chance to target the nearest enemy).

1f

Private Variables

Name

Type

Notes

m_lastSmartBounceTarget

AIActor

Contains a reference to the last AIActor the projectile 'smart' bounced towards. Used to prevent the projectile from smart bouncing towards the same Actor twice in a row.

m_cachedNumberOfBounces

int

Stores the amount of bounces the projectile has left.

m_lastBouncePos

Vector2

Stores the position at which the projectile's most recent ricochet occurred.

Actions and Funcs

Name

Arguments

Call Condition

OnBounce

None

Called when the projectile ricochets.

OnBounceContext

BounceProjModifier (The projectile's bounce component)

SpeculativeRigidbody (The object the projectile is bouncing off. Can be null if the projectile is bouncing off something that doesn't have a rigidbody component, such as a wall)

Called when the projectile ricochets. Provides more contextual variables than OnBounce.

PreviousImporting a Sprite To Visual StudiosNextPierceProjModifier

Last updated 9 months ago

Was this helpful?