Shoot Small Fireball Straight?

Discussion in 'Plugin Development' started by XDemonic25, Mar 22, 2013.

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

    XDemonic25

    Trying To Create some Tests when a player shoots a Small Fireball. But i cant seem to get it to Shoot Straight. (It curves slightly)

    Code:
                            Player Shooter = (Player) evt.getEntity().getShooter();
                            SmallFireball Fire = (SmallFireball) evt.getEntity();
                            Vector Test = Fire.getDirection()
    
    I tried several things and I cant seem to get the Fireball to shoot straight.
     
  2. Offline

    nitrousspark

    thats when you're getting its velocity, to get it to go strait do this

    Code:
    Player shooter = (Player) evt.getEntity().getShooter();
    SmallFireball Fire = (SmallFireball) evt.getEntity();
    Vector Test = Fire.getLocation().getDirection();
    Test.multiply(2);
    Fire.setVelocity(Test);
    
    that will shoot it in a strait line
     
Thread Status:
Not open for further replies.

Share This Page