Player Travel

Discussion in 'Archived: Plugin Requests' started by tstom0, Oct 8, 2013.

  1. Offline

    tstom0

    Hey guys,

    I am after a plugin that will shoot a player towards a destination upon the trigger of a pressure plate or stepping on any block. So basically a player would stand on said block, and get shot out towards a destination that has been specified. Sort of like the sponges on MCCTF. I know that plugins exist that have this functionality but I haven't been able to find one that shoots the player towards a destination not the direction they are facing. If a plugin like this exists, or it is not possible, please let me know!

    Thanks!
     
  2. Offline

    Mathias Eklund

    I think that all it takes is a triggered tnt explosion for the player to be lounged a certain destination.
     
  3. Offline

    AndyMcB1

    Which direction do you want them to go?
     
  4. Offline

    tstom0

    Thats the point, not a direction but to a specified location.
     
  5. Offline

    Gamecube762

    It is possible to launch the player in a direction with .setVelocity(); but it would be nearly impossible to calculate where they would land or the needed Vector to make them land there due to lag and player movement.
     
  6. Offline

    Axe2760

    Nearly impossible? I don't think so... Sounds simple and feasible.
     
  7. Offline

    AndyMcB1

    Code?
     
  8. Offline

    Axe2760

    No idea if this will work, it may need tweaking... But basic idea:

    PHP:
    Location loc = ... //where you want them to shoot to. Replace with whatever

    player.setVelocity(player.getLocation().toVector().subtract(loc.toVector()));
    Basic idea. It might overshoot the player a bit, which is why it needs tweaking. If that won't work, then you would just calculate it with trig.
     
  9. Offline

    timtower Administrator Administrator Moderator

    Axe2760 And it will shoot in a straight line( making it impossible to use without being at height 250 ) And there isn't anything for gravity counter measures
     
  10. Offline

    Axe2760

    timtower uhm, if I understood that correctly, .setY(...)? Not sure what you mean.
     
  11. Offline

    timtower Administrator Administrator Moderator

    It means that if there are blocks in the path between the points that you will crash agains them, you need to jump over them
     
  12. Offline

    Axe2760

    timtower derp. but the OP wanted them like MCCTF's/McPvP's. I crash into walls and ceilings with them all the time. You just have to make them in an open space. Not too big an issue IMO.
     
  13. Offline

    Garris0n

    Axe2760 McPvP's uses blocks under it to figure out which direction to launch the player (although the way it launches is a bit weird, I think it does setVelocity many times throughout the launch).
     
    AndyMcB1 likes this.
  14. Offline

    tstom0

    timtower Axe2760 MCCTF was just a basic example. It would be great if it were possible to set a flight path, like going to the required height before falling back down in an arc formation.

    This is for my server spawn. The spawn consists of a main floating island surrounded by other smaller islands. These smaller islands are not aligned height wise with the main island and are higher up. What I am after is a plugin that whenever a player steps on a certain pressure plate or block, it doesnt matter, they will be flung up and onto the other islands in an arc formation, a straight line would not work because of the island heights. Sorry for not making this clearer.

    Just an idea to put out there (i have no idea whether this is possible and/or even going to work)... How about the possibility to set the top turning point of the arc,that way the plugin could first send the player there before sending them back down to the new island. Thanks so much for the responses! I really appreciate it.
     

Share This Page