Horse jump-meter to set projectile launch power?

Discussion in 'Plugin Development' started by oPryzeLP, Dec 14, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    oPryzeLP

    Hey all!
    I'm brainstorming a new gamemode I'm going to code and I want to lay it all out in my head first. One part of this requires the player to press the spacebar at the right timing to shoot a projectile at a certain power. Obviously, the first thing that comes to mind is a horse. The jump meter on the horse is EXACTLY what I need.

    Is there anyway to "add" that horse meter to a player's screen without them being on a horse? Also, there is no player jump event, so I would need to find a way to disable the jump and instead use the meter's return value to change the power of a projectile.

    Any ideas? Thanks for your time! :)
     
  2. Offline

    Skionz

    @oPryzeLP This is probably client side, but if it is possible you will probably find that your solution lies with packets.
     
  3. Offline

    oPryzeLP

    Packets hmm? Makes sense. If it's client-side, do you think there is any way for me to display the horse meter to them without them being on a horse?
     
    Last edited: Dec 14, 2014
  4. Offline

    Skionz

    @oPryzeLP I doubt the horse meter is sent to the server, but then again I have no idea.
     
  5. Offline

    oPryzeLP

    I suppose an easier method would be to use the XP bar instead and set/get the values. However, using the spacebar is a necessity and there is no playerJumpEvent... How could I detect when they pressed the spacebar while also canceling the jump?
     
  6. Offline

    Skionz

    @oPryzeLP Only way I can think of is to check when the player moves and compare the y values; however, canceling the move event would look bad.
     
  7. Offline

    oPryzeLP

    Yeah... Well the spacebar isn't really the end-all be-all. But they HAVE to use a button from the keyboard and not their mouse.

    EDIT: What about sneaking?
     
    Last edited: Dec 14, 2014
  8. Offline

    Skionz

    @oPryzeLP Use the PlayerSneakEvent. Not sure of the correct name.
     
Thread Status:
Not open for further replies.

Share This Page