Need help for coding "railgun"

Discussion in 'Plugin Development' started by Synoctron, Nov 1, 2014.

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

    Synoctron

    Hey, so I need gun to my minigame, that if you click *item* it would shoot maybe redstone particles and if player gets hit by those particles, that would maybe do little damage and stuff. I could not find any tutorials or plugins that would make this happend, so if anyone knows how to make this, that would be awesome <3
     
  2. Offline

    Skionz

    Get the players line of site, send reddust particle packets to nearby players, check if any LivingEntities are inside the players line of site that != the shooter, and damage those entities.
     
  3. Offline

    Plugers11

    Skionz He can use also vectors ? It would be easier i think. Of course only to display this particles
     
  4. Offline

    Skionz

    Plugers11 can't apply velocity to particles
     
  5. Offline

    Monkeyboystein

    use packets to make an arrow invisible, detect where arrow is and spawn redstone particles on the arrows location? set the damage of arrows to the damage you want the railgun to do?
     
  6. Offline

    Skionz

    Monkeyboystein That would require a scheduler and there are only 20 ticks per second so you wouldn't have many options for speed. I would just use the LivingEntity#getLineOfSight() method.
     
  7. Offline

    xTrollxDudex

    Deprecated. (Hehe line 69)

    Using a BlockIterator or incrementing a vector would be an accurate/fast/non-deprecated solution.
     
    ChipDev likes this.
Thread Status:
Not open for further replies.

Share This Page