Author Topic: Different pain anim based on weapon used?  (Read 512 times)

0 Members and 1 Guest are viewing this topic.

The Happy Friar

  • Happy Happy Joy Joy
  • Administrator
  • Hero Member
  • *****
  • Posts: 858
  • Karma: +42/-4
  • Semi-Newbie.
    • View Profile
    • EarthQuake
Different pain anim based on weapon used?
« on: July 28, 2015, 06:22:10 PM »
Is that possible in the current system?  Or perhaps based on the type of damage dealt (bullet, rocket, etc)?  I know how to do semi-locational animations but (for example), chainsaw does one damage anim, pistol does one, punch does one, rocket does one vs pain in arm, head, etc.?

motorsep

  • Hero Member
  • *****
  • Posts: 967
  • Karma: +74/-128
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Different pain anim based on weapon used?
« Reply #1 on: July 28, 2015, 08:00:06 PM »
Me thinks you can get $player1.getCurrentWeapon() and play pain anim if weapon matches. There is also getIdealWeapon(); in RoE and there are a few more events that might work.

The issue is that you can only determine what play is holding and not what enemy was damaged with. So you might shoot it with pistol and switch to rl quickly. So pain anim for rl would play.

I am sure there can be some hacky workaround done with scripts :)

BloodRayne

  • Old Forum Goer
  • Full Member
  • ***
  • Posts: 136
  • Karma: +13/-0
  • Doom Newbie
    • View Profile
    • Grimm Quest for the Gatherer's Key
Re: Different pain anim based on weapon used?
« Reply #2 on: July 29, 2015, 07:46:42 AM »
For complete accuracy, you need to focus on the projectiles. In their hit() code, pass a variable along to the entity it hit so that you can check per projectile. That way, if the player throws some handgrenades and switches to the gun (or vice versa) the anims will remain accurate. You'll also need some form of precedence then, e.g. if within the same second something is hit by both a bullet and a grenade, the visual impact of the grenade will be larger than the other way around.

motorsep

  • Hero Member
  • *****
  • Posts: 967
  • Karma: +74/-128
  • Artist
    • View Profile
    • Kot in Action Creative Artel
Re: Different pain anim based on weapon used?
« Reply #3 on: July 29, 2015, 09:03:30 AM »
For complete accuracy, you need to focus on the projectiles. In their hit() code, pass a variable along to the entity it hit so that you can check per projectile. That way, if the player throws some handgrenades and switches to the gun (or vice versa) the anims will remain accurate. You'll also need some form of precedence then, e.g. if within the same second something is hit by both a bullet and a grenade, the visual impact of the grenade will be larger than the other way around.

Wouldn't that require SDK code change ?

BloodRayne

  • Old Forum Goer
  • Full Member
  • ***
  • Posts: 136
  • Karma: +13/-0
  • Doom Newbie
    • View Profile
    • Grimm Quest for the Gatherer's Key
Re: Different pain anim based on weapon used?
« Reply #4 on: July 29, 2015, 02:24:55 PM »
For complete accuracy, you need to focus on the projectiles. In their hit() code, pass a variable along to the entity it hit so that you can check per projectile. That way, if the player throws some handgrenades and switches to the gun (or vice versa) the anims will remain accurate. You'll also need some form of precedence then, e.g. if within the same second something is hit by both a bullet and a grenade, the visual impact of the grenade will be larger than the other way around.

Wouldn't that require SDK code change ?
No. You can set a variable by hooking into the script object of a projectile.

entity proj = LaunchProjectiles(blah)