Jump to content

Problems with OnHit/RegisterForHitEvent and scaling


iqoniq

Recommended Posts

if you need to assign another value to a property then don't flag it as const and for the scaling pb, i just remembered that i had to move an object for the new scale to take effect in game. If you still have that problem, try

playerlifeheart.SetScale(hscale)

playerlifeheart.moveto(playerlifeheart)

It seemed to be working kind of as expected except for the life heart magically refilling.

 

I'm using Grab Attacks in conjunction with the mod (not a dependency, just a recommendation), and it seems that if it does a move that would be a kill move and would "kill" the character, because they're marked as essential, rather than enter bleed out they get a refill of health. It does seem to be when the health would enter a negative value, so I'm guessing it's some funkiness with that as opposed to anything I'm actually doing. I've already had to make a check script because I've had to check where the fighters are because they'd end up flying out the bounds of the cage sometimes and into the void stopping the fight from progressing, so that just checks their xyz location every 10 seconds and ports both fighters back to the start point to carry on if they're outside the bounds (which ironically hasn't happened since I wrote it, except for a move sinking them below the navmesh occasionally, which wouldn't cause an issue anyway because they snap back to it).

 

I've tried to work out the refill, but it's probably the combination of the essential marker, Grab Attacks, and the amount of work Papyrus is doing that's causing it. It does work in the player's favour if they're the winner because every hit adds a "brutality bonus" (part of the inspiration was the Pit Fighter arcade game) to the prize purse. There's also the fact it can be considered to be putting on a show, like in WWE when a fighter gets totally fraggled and then has a magical second wind. The fight still plays out with the right fighter winning (although the event scripting on the aliases would still process an "upset" in the right way), so I can live with it I guess.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...