Jump

You are here:
← All Topics
Version: 2019.200 Requirements:uMMORPG3dScript Define:None
Core Changes:YesTutorial Video:No

Description

This Addon allows the player to jump. Pump to the other side of an obstacle, jump over a platform or fall down a mountain when jumping.


Core Changes

  1. [Required] Open the following script Player.cs. See Changes...

    Locate this line:
      if (EventMoveStart())
              {
                  // cancel casting (if any)
                  currentSkill = -1;
                  return "MOVING";
              }

    Add below it:

      if (EventJumpRequest())
              {
    
                  if (isJumping)
                  {
                      return "JUMPING";
                  }
    
              }
  2. [Required] Open the following script Player.cs. See Changes...

    Locate this line:
    if (EventTradeStarted())
              {
                  // cancel casting (if any), stop moving, set target, go to trading
                  currentSkill = -1;
                  rubberbanding.ResetMovement();
                  target = FindPlayerFromTradeInvitation();
                  return "TRADING";
              }

    Add below it:

      if (EventJumpRequest())
             {
                 return "JUMPING";
             }
  3. [Required] Open the following script Player.cs. See Changes...

    Locate this line:
    if (state == "DEAD")     return UpdateServer_DEAD();

    Add below it:

    if (state == "JUMPING") return UpdateServer_JUMPING();
    
  4. [Required] Open the following script Player.cs. See Changes...

    Locate this line:
     else if (state == "TRADING") {}

    Add below it:

    else if (state == "JUMPING") { }
  5. [Required] Open the following script Player.cs. See Changes...

    Locate this line:
    float horizontal = Input.GetAxis("Horizontal");
    float vertical = Input.GetAxis("Vertical");

    Add below it:

    JumpHandling(horizontal, vertical);

Installation

  1. [Required] Apply all core changes.
  2. [Required] Add Collisions on every mesh used to jump over or block jumping.
  3. [Optional] Modify the Jump Settings on the player prefab.

Screenshots

Support the IndieMMO Team Today!

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.