Thread: Question Regarding RS2 Combat

Results 1 to 4 of 4
  1. #1 Question Regarding RS2 Combat 
    Registered Member
    Join Date
    Apr 2016
    Posts
    26
    Thanks given
    6
    Thanks received
    14
    Rep Power
    71
    Been working on a rudimentary combat system for a little framework and have a quick question. Hoping someone can quickly clarify this so I don't have to make an account and test it manually. I haven't played RS much in the past so I apologize for my lack of gameplay knowledge.

    Say our player is attacking an entity with a bow every 4 ticks or 2.4 seconds.

    We calculate when to hit the other entity with the following logic.
    Code:
      final int modulus = WeaponTimeTable.getWeaponTime(player.getWeapon());
                    if (ticks % modulus == 0) {
                        player.setAnimation(
                                WeaponAnimationTable.getAttackAnimationFor(player.getWeapon(), AttackStyle.ACCURATE));
    ...
    However, say the player switches weapons between the ticks on which their current weapon would hit. To be able to attack immediately after this switch (Ex. combo a shortbow to 2h sword) would they simply need to time both ticks closely? Or would the 2H sword always attack immediately following the switch (ignoring it's actual timer and hitting immediately) and then begin delaying until it's actual attack timer is reached for the second attack?
    Reply With Quote  
     

  2. #2  
    Textures developer

    Kris's Avatar
    Join Date
    Jun 2016
    Age
    22
    Posts
    3,467
    Thanks given
    620
    Thanks received
    2,151
    Rep Power
    3547
    Don't know if I understood what you asked but the delay created through combat is never reset like that. If you attack something, switch the weapon, attack something again - you will wait until the last delay is up before blowing another strike.
    I made a small demonstrational gif which should answer your questions if I understood your questions correctly..
    Spoiler for penis too large:

    [Only registered and activated users can see links. ]

    Discord: Kris#1337
    Reply With Quote  
     

  3. Thankful user:


  4. #3  
    Registered Member
    Join Date
    Apr 2016
    Posts
    26
    Thanks given
    6
    Thanks received
    14
    Rep Power
    71
    Quote Originally Posted by Kris View Post
    Don't know if I understood what you asked but the delay created through combat is never reset like that. If you attack something, switch the weapon, attack something again - you will wait until the last delay is up before blowing another strike.
    I made a small demonstrational gif which should answer your questions if I understood your questions correctly..
    Exactly what I needed to know, thank you! Was having difficulty phrasing it well.
    Reply With Quote  
     

  5. #4  
    Donator
    snurf's Avatar
    Join Date
    Oct 2015
    Posts
    571
    Thanks given
    65
    Thanks received
    85
    Rep Power
    61
    Quote Originally Posted by Kris View Post
    Don't know if I understood what you asked but the delay created through combat is never reset like that. If you attack something, switch the weapon, attack something again - you will wait until the last delay is up before blowing another strike.
    I made a small demonstrational gif which should answer your questions if I understood your questions correctly..
    Damn your click inaccurate as fuck Kris, spend some more time gaming! Joke
    [Only registered and activated users can see links. ]
    [Only registered and activated users can see links. ]
    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

Similar Threads

  1. Question regarding combat functionality
    By lare96 in forum Help
    Replies: 5
    Last Post: 10-13-2014, 08:20 PM
  2. Replies: 0
    Last Post: 04-19-2014, 04:22 AM
  3. A few questions regarding the RS2 client
    By Jack Daniels in forum Help
    Replies: 2
    Last Post: 04-21-2013, 04:25 PM
  4. Noob question regarding banking
    By warbeak1245 in forum Help
    Replies: 0
    Last Post: 08-22-2009, 02:38 AM
  5. 2 525 questions regarding bh.
    By Mr NYC in forum Help
    Replies: 2
    Last Post: 05-04-2009, 02:54 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •