Thread: Ranging

Results 1 to 10 of 10
  1. #1 Ranging 
    Way to long

    63oooo's Avatar
    Join Date
    Sep 2008
    Posts
    686
    Thanks given
    117
    Thanks received
    10
    Rep Power
    201
    I was rewriting my npc combat i just started range and this happens.
    Hit 1:Happens as the emote starts
    Hit 2:Happens as the gfx Hits the NPC
    It also does with this all bows.
    & it only does this for bows with gfx's


    public void rangeGFX(int speed, int arrow){
    int EnemyX = 0;
    int EnemyY = 0;
    client AttackingOn2 = (client) server.playerHandler.players[AttackingOn];
    if(AttackingOn2 != null){
    EnemyX = PlayerHandler.players[AttackingOn].absX;
    EnemyY = PlayerHandler.players[AttackingOn].absY;
    }
    int offsetX = (absY - EnemyY) * -1;
    int offsetY = (absX - EnemyX) * -1;
    CreateProjectile(absY, absX, offsetY, offsetX, 50, speed, arrow, 43, 31, -AttackingOn-1);
    }
    public void rangeGFXNPC(int speed, int arrow){
    int EnemyX = server.npcHandler.npcs[attacknpc].absX;
    int EnemyY = server.npcHandler.npcs[attacknpc].absY;
    int offsetX = (absY - EnemyY) * -1;
    int offsetY = (absX - EnemyX) * -1;
    CreateProjectile(absY, absX, offsetY, offsetX, 50, speed, arrow, 43, 31, attacknpc + 1);
    }








    Reply With Quote  
     

  2. #2  
    Registered Member

    Join Date
    Jan 2009
    Posts
    215
    Thanks given
    36
    Thanks received
    4
    Rep Power
    126
    It's just double hitting. Show me a part of your code.
    Reply With Quote  
     

  3. #3  
    I don't take you serious
    Kastro's Avatar
    Join Date
    Nov 2008
    Posts
    2,504
    Thanks given
    92
    Thanks received
    389
    Rep Power
    604
    Well, you created a way to make Dark Bows fire correctly; that much is certain.


    Slow down your ranging timer and it shouldn't do that
    Reply With Quote  
     

  4. #4  
    Community Veteran


    Join Date
    Nov 2006
    Posts
    531
    Thanks given
    6
    Thanks received
    21
    Rep Power
    489
    Quote Originally Posted by Jeba View Post
    Well, you created a way to make Dark Bows fire correctly; that much is certain.

    LOL
    Reply With Quote  
     

  5. #5  
    Banned

    Join Date
    Jan 2009
    Age
    31
    Posts
    2,661
    Thanks given
    66
    Thanks received
    207
    Rep Power
    0
    how does this combat work?

    is their a timer constnatly running and when like u hit 0 it goes to

    timer in seconds X 2? like to 6 for 3600 Miliseconds.
    Reply With Quote  
     

  6. #6  
    Way to long

    63oooo's Avatar
    Join Date
    Sep 2008
    Posts
    686
    Thanks given
    117
    Thanks received
    10
    Rep Power
    201
    bump







    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Jan 2009
    Posts
    215
    Thanks given
    36
    Thanks received
    4
    Rep Power
    126
    Quote Originally Posted by Joona View Post
    It's just double hitting. Show me a part of your code.

    Watch all of your comments...
    Reply With Quote  
     

  8. #8  
    Way to long

    63oooo's Avatar
    Join Date
    Sep 2008
    Posts
    686
    Thanks given
    117
    Thanks received
    10
    Rep Power
    201



    public void rangegfx(int speed, int arrow){
    int enemyx = 0;
    int enemyy = 0;
    client attackingon2 = (client) server.playerhandler.players[attackingon];
    if(attackingon2 != null){
    enemyx = playerhandler.players[attackingon].absx;
    enemyy = playerhandler.players[attackingon].absy;
    }
    int offsetx = (absy - enemyy) * -1;
    int offsety = (absx - enemyx) * -1;
    createprojectile(absy, absx, offsety, offsetx, 50, speed, arrow, 43, 31, -attackingon-1);
    }
    public void rangegfxnpc(int speed, int arrow){
    int enemyx = server.npchandler.npcs[attacknpc].absx;
    int enemyy = server.npchandler.npcs[attacknpc].absy;
    int offsetx = (absy - enemyy) * -1;
    int offsety = (absx - enemyx) * -1;
    createprojectile(absy, absx, offsety, offsetx, 50, speed, arrow, 43, 31, attacknpc + 1);
    }




    999999







    Reply With Quote  
     

  9. #9  
    Registered Member

    Join Date
    Jan 2009
    Posts
    215
    Thanks given
    36
    Thanks received
    4
    Rep Power
    126
    Quote Originally Posted by DownedSe View Post
    public void rangegfx(int speed, int arrow){
    int enemyx = 0;
    int enemyy = 0;
    client attackingon2 = (client) server.playerhandler.players[attackingon];
    if(attackingon2 != null){
    enemyx = playerhandler.players[attackingon].absx;
    enemyy = playerhandler.players[attackingon].absy;
    }
    int offsetx = (absy - enemyy) * -1;
    int offsety = (absx - enemyx) * -1;
    createprojectile(absy, absx, offsety, offsetx, 50, speed, arrow, 43, 31, -attackingon-1);
    }
    public void rangegfxnpc(int speed, int arrow){
    int enemyx = server.npchandler.npcs[attacknpc].absx;
    int enemyy = server.npchandler.npcs[attacknpc].absy;
    int offsetx = (absy - enemyy) * -1;
    int offsety = (absx - enemyx) * -1;
    createprojectile(absy, absx, offsety, offsetx, 50, speed, arrow, 43, 31, attacknpc + 1);
    }
    Code:
    public void rangegfx(int speed, int arrow){
    int enemyx = 0;
    int enemyy = 0;
    client attackingon2 = (client) server.playerhandler.players[attackingon];
    if(attackingon2 != null){
    enemyx = playerhandler.players[attackingon].absx;
    enemyy = playerhandler.players[attackingon].absy;
    }
    public void rangegfxnpc(int speed, int arrow){
    int enemyx = server.npchandler.npcs[attacknpc].absx;
    int enemyy = server.npchandler.npcs[attacknpc].absy;
    int offsetx = (absy - enemyy) * -1;
    int offsety = (absx - enemyx) * -1;
    createprojectile(absy, absx, offsety, offsetx, 50, speed, arrow, 43, 31, attacknpc + 1);
    }
    Reply With Quote  
     

  10. #10  
    Way to long

    63oooo's Avatar
    Join Date
    Sep 2008
    Posts
    686
    Thanks given
    117
    Thanks received
    10
    Rep Power
    201
    Didn't work.







    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •