Started by
ShatteredVessel
on
Topic category: Troubleshooting, bugs, and solutions
I made a procedure that deals damage based on velocity and if an entity is hitting a wall. For context, it is on tick while an effect is on an entity, which is applied by a hammer that deals high knockback. Its really inconsistent for some reason, even when using set health procedures to bypass i-frames. I tried hardcoding it to deal 16 damage, but that didn't work -- however, when I put something like 9999, it does work. I don't see any reason why it wouldn't be dealing 16 damage though. Note that both the "Set Health" and "Deal Damage to" procedures are both having this ussue.
Delta movement does not report the correct value in some cases.
You may need to implement custom velocity system by storing locations every N ticks and then comparing difference between locations to determine velocity/speed