Battering Ram woes



  • So this is a tricky and annoying one.

    Is there a way to find the current animation time of the battering ram whilst it is being used to ram a door?

    The only values I seem to be able to get are Desired Anim Length, and Total Length.
    They are both totals. But there is no way to grab a current time and/or reset or set the current time.

    Read below to find out why I need to know this.

    TL;DR

    Basically my battering ram is buggering up if a player jumps off the ram, and then uses it again to finish the ramming sequence. It seems to go into an infinite loop once the sequence is over.

    Here is an example of the bug I am running into:

    I have a HUD marker with a value of 10.
    I have a ram that has a desired anim length of 3 and a Total length of 30.
    The ram has a Hit Target of an invisible door underneath the level call “ramDoor”
    I have a counter that adds 1 every time an ramDoor is damaged until the value of 10 is hit (this is used to show the HUD marker progress bar correctly).

    This all works very well, UNLESS….

    Unless the ram is used on and off.
    If the ram is used in one big hit, then all is well, but when people jump in and out of the ramming animation, problems occur.
    For example, the counter can actually remain at 0, but the total length time of the ram animation can be reached without doing any damage at all.
    Because if a player jumps on for 2 seconds (ram hits door at 2.875), then the current animation time starts and pauses, so now the current time is 2sec / 30 sec.
    Then the player does the same thing again, still, no damage occurs, and our timer is at 4sec /30sec.
    The players can do this over and over again, until the timer reaches 30. No damage gets done, thus the counter does not finish counting, the hud progress marker is not updated, but the door knock down trigger is triggered.

    I am thinking that the only last measure I can try is to somehow get the current time of the animation, and if it does not reach 2.875 (time it takes to hit the door with anim time of 3), then somehow set the current time back again, so no progress is made.
    I am not certain of how to do this though.

    The other solution is to make the timer ridiculously long (20,000 or so), and after 10 damage, the door is knocked down. This seems the most feasible option.

    But what I would like to do is find out how to find a current animation time, and find out how to set the animation time or reset the animation time.


Log in to reply