Tnt Blasting and Player Spawn

Discussion in 'Plugin Development' started by TMAN93436, Jul 14, 2014.

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

    TMAN93436

    I just want a way to set a spawn where the ignited tnt spawns and gets shot at a specific area.

    Is there a way to do this?

    If there isn't how do I make it so tnt explodes in an area but it happens at random places in the area?

    Thanks
     
  2. Offline

    TheMcScavenger

    • Set a spawn for what? Blocks? Entities? Players?
    • How does the ignited tnt "spawn"? Do players place it? Do you spawn it with your code?
    • How does it shoot? Tnt cannon? Velocity?
     
  3. Offline

    TMAN93436

    TheMcScavenger
    I want to make it so one command sets the spawn for players and one command from where the tnt shoots out of and a command for where the tnt lands, in this case a random area.
    And yes I want it so the velocity changes depending on where the tnt shoots out of.
    What i am trying to create is a minigame similar to this:
    http://www.mariowiki.com/Bombs_Away_(minigame)
     
  4. Offline

    TheMcScavenger

    Set spawn:
    Code:
    player.getWorld().setSpawnLocation(x, y, z);
    Spawn TNT & Set Velocity:
    Code:
    World world = player.getWorld();
    Location location = player.getLocation();
    TNTPrimed tnt = (TNTPrimed) world.spawn(location, TNTPrimed.class);
    tnt.setVelocity(velocity);
     
Thread Status:
Not open for further replies.

Share This Page