• Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • How to know if the player is capable of mounting?

    Discussion in 'Community Developer Forum' started by Neverdyne, Mar 26, 2015.

    1. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      This has been eluding me. The Actionmanager.CanMount property returns a uint. What does that value mean?
       
    2. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      I'm going to guess it's the Mount's ID (so you can specifically check to see if the Chocobo mount is available, or some other mount). Could be wrong though (I've never used it). :cool:
       
    3. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Thing is it just returns one number without any parameters, so is that the default mount's id? I just tested with a character that hasn't gotten the chocobo yet and it returned 653.
       
    4. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      Actually I just tried:

      Log(Actionmanager.CanMount);

      Regardless of my state it returns 0.

      I also tried:

      Log(Actionmanager.MountId);

      Regardless of what mount I'm on it returns 1.

      Maybe the offsets are broken? mastahg might have to chime in.

      Actionmanager.AvailableMounts works but that does you no good lol.
       
    5. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      I guess I could check with "Actionmanager.AvailableMounts.Length > 0". That API call seems to be new.
       
      Last edited: Mar 26, 2015
    6. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      Oh, you're wanting to know if the user has obtained a mount yet, not if they are capable of mounting? Yeah that could work then.

      foreach (var Mount in Actionmanager.AvailableMounts)
      {
      Log(Mount);
      }

      Returns what mounts the player has (in string form) but I'm not sure what could be done with that (what I was referring to earlier). :eek:
       
    7. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Yeah it's just for my movement logic, don't want to try and mount if the user doesn't even have mounts yet.
       
    8. dark wolf

      dark wolf New Member

      Joined:
      Mar 11, 2015
      Messages:
      95
      Likes Received:
      2
      Trophy Points:
      0
      Wasn't there a way to check the players speed. (MovementManager.Speed Property )So if your move check speed and then try to mount and check speed . if the speed is still the same i did not mount and one could assume he hasn't gotten the mount yet.
       
    9. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      Actionmanager.CanMount == 0

      Really should make it a bool and invert it, but as it stands it returns the errorcode so no error means its ok to mount.
       
    10. Neverdyne

      Neverdyne Community Developer

      Joined:
      Sep 12, 2014
      Messages:
      649
      Likes Received:
      18
      Trophy Points:
      18
      Thanks!
       
    11. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      If it's working as intended, then does that mean CanMount just returns if the player HAS a mount (and not if the player is actually available/able to mount)? If so, is there any way to check for that then (technically checking for the ability to Sprint or Cast would work but they wouldn't be consistent)?
       
      Last edited: Mar 27, 2015
    12. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      Core.Player.IsMounted to check if you are currently mounted.
      No.
      CanMount checks if you can mount hence its name, canmount
       
    13. Endus

      Endus Community Developer

      Joined:
      Jul 9, 2012
      Messages:
      458
      Likes Received:
      6
      Trophy Points:
      18
      Hrm, thanks for the info. I'll have to do some more testing when I get back on tonight. I could swear it was returning 0 even when I was already mounted (didn't try while in combat or in town). I suppose if CanMount doesn't check for IsMounted one could just combine them. Thanks again. :cool:
       
    14. mastahg

      mastahg Administrator Staff Member

      Joined:
      Feb 27, 2011
      Messages:
      5,343
      Likes Received:
      383
      Trophy Points:
      83
      The mount ability can be used while mounted so that's an invalid test case.
       

    Share This Page