Results 1 to 10 of 34

Thread: Weapon functions (+ setMoveSpeedScale)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Mitch View Post
    It does work for me, but you first need to bash once and then melee is blocked. But I should be able to fix that.

    PHP Code:
    while(isAlive(self))
    {
        
    self setweaponfiremeleedelay(1000); // keep forcing 1s delay

        
    if(self MeleeButtonPressed() && self UseButtonPressed())
        {
            break;
        }

        
    wait(0.05);

    Yep it was an error on my side not forcing the delay. Works fine except for the first bash like you described.

  2. The Following User Says Thank You to filthy_freak_ For This Useful Post:

    Mitch (21st May 2015)

  3. #2
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Yep it was an error on my side not forcing the delay. Works fine except for the first bash like you described.
    I fixed the first bash problem. In addition to blocking firing, it also blocks aiming and reloading your weapon and it delays switching your weapon.

    https://github.com/M-itch/libcod/com...a4f6d86ac2ce74

  4. #3
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Mitch View Post
    I fixed the first bash problem. In addition to blocking firing, it also blocks aiming and reloading your weapon and it delays switching your weapon.

    https://github.com/M-itch/libcod/com...a4f6d86ac2ce74
    Nice, previous bug is resolved. Found another though - if setweaponfiremeleedelay gets called on you while you are doing a weapon animation (Shooting, bashing) it will repeat the animation.

  5. #4
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Found another though - if setweaponfiremeleedelay gets called on you while you are doing a weapon animation (Shooting, bashing) it will repeat the animation.
    You could read the delay value and only start sprinting after the value has reached 0.
    (When the value is above 0 then the player has a weapon animation running)

Posting Permissions

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