Jump to content

Draw weapon - issue with script


SAC020

Recommended Posts

So, I am trying to script a mod where you select two actors, they assume a position, then actor A executes actor B point blank.

TargetaWeapon = targeta.GetEquippedWeapon()
targetb.removefromallfactions()
targetb.setprotected(false)
targetb.playidle(wpnidle2)
targeta.setrestrained(false)
targeta.drawweapon()
utility.wait(0.2)
targeta.setrestrained(true)
targeta.playidle(wpnidle1)
utility.wait(5)
TargetaWeapon.fire(targeta, fireammo)
targetb.kill()
instanceID = gunshot.Play(targetb)
target.ApplyHavokImpulse(0, 1, 0, 50)

Screenshot here

 

All is good and well, but actor A never equips any weapon. He just assumes a position according to the passed idle, then the execution is about playing a sound and killing actor B via script. I don't know what I'm doing wrong, but I need to make actor A draw a weapon somehow.

 

Thanks!

Link to comment
Share on other sites

  • 3 months later...
  • Recently Browsing   0 members

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