Advanced Tutorial 6: How To Change The Properties Of CapitanBlackClaw When Triggered

From The Endless Mission Wiki
Jump to: navigation, search
This tutorial will teach you how to change different properties of CapitanBlackClaw when some event is triggered. This is useful if you want to make custom power ups or effects on the character itself. This tutorial will demonstrate how to change jump height, dash speed, and distance through any event you want.

Power up: More Jump Height[edit | edit source]

1. Select CapitanBlackClaw (CBC) in your Hierarchy.
2. Scroll down to "Jump Controller" in her components list.
3. We will create a function to upgrade her jump. The best way to do this is to put a new method inside of "JumpController" that changes her jump height.
4. Open the "JumpController" script (This one looks very complicated, but don't worry) scroll down to "#region methods" and add a function called "UpgradeJump" with an [EndlessEventVisible] tag. Here is how that should look:
  #region methods
       [EndlessEventVisible]
       public void UpgradeJump()
       {
           //"You can modify whichever variable you want here. The variables that are available are at the top of the script, here are some suggestions: _jumpHeight, _doubleJumpHeight, _headBopJumpHeight"
           //Mess with the number values of to get a sense of what feels right for what your going for. just remember to add an "f" and a ";".
           _jumpHeight = 3f;
       }
5. Set up some event that you want to upgrade her jump. This could be a simple TriggerVolume or more complex event. If you do not know how to trigger a function please visit this article: How do I add a Trigger Volume to Any Item.
6. Add an entry to your event and drag CapitanBlackClaw into the "Target" field. from the drop down menu select "UpgradeJump".

Power up: Upgrade Dash Speed & Time[edit | edit source]

1. Select CapitanBlackClaw (CBC) in your Hierarchy.
2. Scroll down to her "Dash Controller" in the components list.
3. Next, we will create a function to upgrade her dash. The best way to do this is to put a new method inside of "Dash Controller" that changes her dash speed and dash time.
4. Open the script (This one also looks very complicated, don't worry) scroll down to "#region methods" and add a function called "UpgradeDash" with an [EndlessEventVisible] tag. Here is how that should look:
  #region methods
       [EndlessEventVisible]
       public void UpgradeDash()
       {
           //"You can modify whichever variable you want here. The variables that are avaiable are at the top of the script, here are some suggestions: _dashDuration, _dashSpeed, _dashAttackPower, _dashAttackCooldown, _dashEnemyKnockbackSpeed, _dashEnemyKnockbackDuration"
           //Mess with the number values of to get a sense of what feels right for what your going for. just remember to add an "f" and a ";".
           _dashDuration = .5f;
           _dashSpeed = 21f;
       }
5. Set up some event that you want to upgrade her dash. This could be a simple TriggerVolume or more complex event. If you do not know how to trigger a function please visit this article: How do I add a Trigger Volume to Any Item.
6. Add an entry to your event and drag CapitanBlackClaw into the "Target" field. from the drop down menu select "UpgradeDash".