[Need Help] Lazertag Minigame plugin.

Discussion in 'WIP and Development Status' started by ItzFeff890, Nov 7, 2014.

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

    ItzFeff890

    Hey! I'm a minecraft dev and i'm looking for a solution to a problem I've encountered while making my minigame. Well... its not really a problem. Here's what I need:
    When you shoot a bow and it shoots a laser, I need any players in a certain location to freeze for 5 seconds.
     
  2. Offline

    Skionz

    bukkit*
    What do you mean shoot a laser? Shoot a line of particles or what? Just check if a player is in the lasers pass and cancel the move events for that player.
     
  3. Offline

    mrCookieSlime

    Skionz ItzFeff890
    Actually dont cancel their movements.
    Better apply Slowness 100 and Jump Boost -100 for X secondy. Less laggy ;)
     
    Skionz likes this.
  4. Offline

    ItzFeff890

    Skionz Yes. It is a line of particles but I need it so if anyone is in that line they get affected.
     
  5. Offline

    Skionz

    ItzFeff890 I would use player.getLineOfSight() then just iterate through all of the online players and check if they are within a distance of 1 or 1.5.
     
  6. Offline

    mrCookieSlime

    ItzFeff890 Skionz
    Another thing:
    Use world.getPlayers() instead of Bukkit.getOnlinePlayers() .
    Since we can say for sure that players in a different world will definitely not be in his line of sight.
     
    Googlelover1234 likes this.
  7. Offline

    ItzFeff890

    Skionz mrCookieSlime
    Thanks!
    But can you please send me the method you would use for entities aswell as players?
     
  8. Offline

    mrCookieSlime

  9. Offline

    ItzFeff890

    mrCookieSlime
    Method though? Let me refrase. Can you please send me the actual code I would use for this?
     
  10. Offline

    Skionz

    ItzFeff890 Did you mean to say "Spoon-feed me the code"
     
    mrCookieSlime likes this.
  11. Offline

    mrCookieSlime

    ItzFeff890
    Just a standard for loop using this method. Nothing advanced.
     
  12. Offline

    ItzFeff890

    Skionz mrCookieSlime
    "Spoon-feed me the code".
    If that's the phrase you would use for a newbie that is what I need unless any of you know a good tutorial to learn it.
     
  13. Offline

    mrCookieSlime

  14. Offline

    ItzFeff890

    mrCookieSlime Skionz
    Im sorry this is really confusing me. I just need a method to get any entities infront of me. Can you help?
     
  15. Offline

    Skionz

    ItzFeff890 We told you exactly what you need to do at least twice.
     
  16. Offline

    Desle

    Cool idea for a minigame. =)
     
Thread Status:
Not open for further replies.

Share This Page