Imca Posted August 4, 2013 Share Posted August 4, 2013 I am trying to make an unarmed weapon that runs a script every time the player punches... however "Begin OnFire" does not seem to be working. Can unarmed weapons even use this script command? If not is there a begin on attack or something similar in NVSE? Link to comment Share on other sites More sharing options...
jazzisparis Posted August 4, 2013 Share Posted August 4, 2013 That's an interesting question.I can think of two ways to achieve this. The first is to make the weapon score a critical hit with every successful strike, and use a critical effect to apply all the additional hit-effects. The second would involve a script. I won't go into details (unless you would like to try it), since I think it's unreliable. Link to comment Share on other sites More sharing options...
Imca Posted August 4, 2013 Author Share Posted August 4, 2013 I would like to try it actualy, since I am making a script not just an effect for the weapon, and it would be best if it would activate without having to score a hit. Link to comment Share on other sites More sharing options...
jazzisparis Posted August 4, 2013 Share Posted August 4, 2013 it would be best if it would activate without having to score a hit. If the script is supposed to run every time the player punches, regardless of whether he actually hit someone, then it would probably make things much simpler. I'll need to know more. What, exactly, is the script intended to do? Link to comment Share on other sites More sharing options...
Imca Posted August 4, 2013 Author Share Posted August 4, 2013 It is intended to run on every punch yes, I am trying to make a thing right now that detonates all the players explosives when the punch, but this is just a test really as I plan to be making more unarmed weapons in general, and if I can get a script to do that, I can make some really unique ones.... like posibly even a rocket fist. Thats kind of an issue I have with mods right now, there is no love for unarmed players, dispite punching being very fun. >.> Link to comment Share on other sites More sharing options...
jazzisparis Posted August 4, 2013 Share Posted August 4, 2013 I came upon something very interesting when reading about the OnHit block type in the GECK wiki:"This function has been altered in New Vegas to run when a weapon hits a target." It is confirmed to work both with melee and ranged weapons: begin OnHit set rTarget to GetOwnerLastTarget ; (Returns the actor that was hit by the weapon) ; Do stuff on the target. end Link to comment Share on other sites More sharing options...
Imca Posted August 4, 2013 Author Share Posted August 4, 2013 The thing is though, I want the efect to activate even if nothing was hit... Sorry. Link to comment Share on other sites More sharing options...
jazzisparis Posted August 5, 2013 Share Posted August 5, 2013 In that case, this will work: short bEquipped short iAction begin OnUnequip set bEquipped to 0 end begin OnEquip player set bEquipped to 1 end begin GameMode if bEquipped if player.IsWeaponOut if iAction != player.GetAnimAction set iAction to player.GetAnimAction if iAction == 2 ; Do stuff. endif endif endif endif end Link to comment Share on other sites More sharing options...
Recommended Posts