Solved Ability Activation Ideas

Discussion in 'Spigot Plugin Development' started by WAS, Apr 30, 2017.

  1. WAS


    What would be a good method of triggering a ability, that wouldn't involve and item, and wouldn't involve the chat, and wouldn't interfere with another plugins method of ability activation?

    I had in mind Sneaking twice. Detecting a sneak, and than no sneak, and than a sneak within a 2 seconds or something.

    Or I thought of blocking twice within 2 seconds.
    #1 WAS, Apr 30, 2017
    Last edited: May 1, 2017
    • Like Like x 1
  2. Make it like Wynncraft? "Combos" like RClick + RClick + RClick = 1st combo
    RClick + RClick + LClick = 2nd combo
    and so on
    • Like Like x 1
  3. WAS


    Oh i like that. Not sure why I didnt think of that.
  4. WAS


    Hmm how might one track combos? I was thinking of counting successful actions but I got confused when it came to discerning from different combos and counting them towards the wrong combo. Meh. Long day, and got no coffee.

    Biggest thing I'd like players to be able to activate the ability without an item in their hands is where it gets real tricky and combos might not even work.
  5. Here's an Idea, listen to PlayerToggleSneakEvent, and store it in a Map, where the key is the player's UUID, and the value, an list of a pair with sort of constant to represent different actions and and the time that they performed the action, so when they do it again, you can see if they sneaked within the last 3 seconds or so, if they did, remove the values and activate the abillity
    • Like Like x 1
  6. WAS


    That's what I was thinking to. Seemed the most solid method without an item. Currently I've been starting implementing an item which I didn't really want to do. Think I might just can that and do the sneak. Thanks.
  7. Why no slot binding system?
  8. WAS


    I'm sorry, I don't understand?
  9. BananaPuncher714


    Making them turn around in a circle then look up and down 3 times really quickly:D
    • Funny Funny x 1
  10. WAS


    Ive always wanted the hokeypokie to be a matter or life and death.
  11. I'll try to explain.

    So you know the 9 boxes at the bottom of the screen in which items can be placed? (We won't place items in them, don't worry). Those are slots.

    To bind an ability to a slot, have for example a command or some GUI, whatever you like. This way a player can make their own personalised setup.

    Then we they want to active an ability, switch to the slot the ability is bound to (for example, arrow storm is bound to slot 4, so they press 4 on their keyboard to go the slot), and perform an action. For example, left click or sneak.

    Then also add a way to disable ability casting, a command for example. Once it's been disabled, clicking and sneaking won't activate an ability. You could also add a check to not cast when the player has an item or weapon in that slot.
    • Like Like x 1
  12. When I want to involve multiple activities that you have to do in a certain time, use HashMaps. Make some runnables and if they didn't complete the rest of the sequence, call the whole thing off.
  13. What? How is that relevant to my post?
  14. Sorry!!! I think I replied to it by accident! Sorry!!! :(
    • Like Like x 1
  15. WAS


    Thanks everyone! I've decided to just go with an item for now. I figured with the theme I am doing it should be a device, so I went with that. Though I am grateful for the ideas and definitely have ideas to use on future plugins.

    If you are wondering what I was working on: plug drop
    • Like Like x 1