Damage Impact

Post your example zscripts/ACS scripts/etc here.

Damage Impact

Postby Hey Doomer » Fri Oct 29, 2021 8:19 am

Another minimalist suggestion... This isn't realistic (unless Hollywood is accurate or one considers lower gravity off-Earth) but creates an opposite partial thrust based on damage, angle of attack, and mass (a monster can be punched out of the way or blown halfway across a room):

Code: Select allExpand view
class di_EventHandler : EventHandler
  void WorldThingDamaged(WorldEvent e)
   if (e.thing)
      e.thing.Thrust(e.damage * 0.5 * (100 / e.thing.mass), e.damageangle);

The arbitrary 0.5 multiplier seems to work.

It does look a bit silly with infighters skating about. I haven't extensively tested this to see if a player would get stuck in a map from being pushed around by attacks. I suppose that is possible.
You do not have the required permissions to view the files attached to this post.
Hey Doomer
Joined: 25 Sep 2021
Operating System: Windows 11
OS Test Version: No (Using Stable Public Version)
Graphics Processor: ATI/AMD with Vulkan Support

Return to Script Library

Who is online

Users browsing this forum: Hey Doomer and 0 guests