Jump to content

I want to make a stim pistol


LX6R

Recommended Posts

Would it be possible to assign the stimpak effect to a pistol?

 

I tried to use the medic effect on a pistol. Problem is, when my companions are downed, I cannot pick them up by just healing them. Therefore I wonder if it would fix the problem if I had a pistol that has the stimpak effect.

Link to comment
Share on other sites

A while back I messed about with magic effects (tedious) to make a healing weapon enchantment that pops actors stuck in essential/bleedout:

Scriptname SKK_HealingMGEF extends activemagiceffect

ActorValue         Property pHealth Auto Const Mandatory
Sound              Property pNPCHumanStimpakNPCB Auto Const Mandatory
RefCollectionAlias Property Alias_Healing Auto Const Mandatory

Event OnEffectStart(Actor akTargetActor, Actor akCasterActor)
If (akTargetActor.GetValue(pHealth) < akTargetActor.GetBaseValue(pHealth)) && (akTargetActor.IsHostileToActor(Game.GetPlayer()) == FALSE)
   Alias_Healing.AddRef(akTargetActor as ObjectReference)
   pNPCHumanStimpakNPCB.Play(akTargetActor as ObjectReference)
   akTargetActor.RestoreValue(pHealth, ((akTargetActor.GetBaseValue(pHealth) * 1.0) - akTargetActor.GetValue(pHealth) ) 
   akTargetActor.ResetHealthandLimbs()
   akTargetActor.SetNoBleedoutRecovery(False)
   StartTimer(6) ; Overlap as bleedout takes 11 seconds to recover
EndIf
EndEvent

Event OnTimer(Int iTimer)
Int iIndex = 0  
While (iIndex < Alias_Healing.GetCount())
ObjectReference ThisREF = Alias_Healing.GetAt(iIndex)
If ((ThisREF as Actor).IsBleedingOut() == FALSE)
   (ThisREF as Actor).SetNoBleedoutRecovery(True) 
   Alias_Healing.RemoveRef(ThisREF)
   iIndex -= 1
EndIf
iIndex +=1
EndWhile
If  (Alias_Healing.GetCount() > 0)
   StartTimer(6) 
Endif
EndEvent

 

Fire & Forget MagicEffect script > Enchantment > Legendary Weapon OMOD

Link to comment
Share on other sites

A while back I messed about with magic effects (tedious) to make a healing weapon enchantment that pops actors stuck in essential/bleedout:

Scriptname SKK_HealingMGEF extends activemagiceffect

ActorValue         Property pHealth Auto Const Mandatory
Sound              Property pNPCHumanStimpakNPCB Auto Const Mandatory
RefCollectionAlias Property Alias_Healing Auto Const Mandatory

Event OnEffectStart(Actor akTargetActor, Actor akCasterActor)
If (akTargetActor.GetValue(pHealth) < akTargetActor.GetBaseValue(pHealth)) && (akTargetActor.IsHostileToActor(Game.GetPlayer()) == FALSE)
   Alias_Healing.AddRef(akTargetActor as ObjectReference)
   pNPCHumanStimpakNPCB.Play(akTargetActor as ObjectReference)
   akTargetActor.RestoreValue(pHealth, ((akTargetActor.GetBaseValue(pHealth) * 1.0) - akTargetActor.GetValue(pHealth) ) 
   akTargetActor.ResetHealthandLimbs()
   akTargetActor.SetNoBleedoutRecovery(False)
   StartTimer(6) ; Overlap as bleedout takes 11 seconds to recover
EndIf
EndEvent

Event OnTimer(Int iTimer)
Int iIndex = 0  
While (iIndex < Alias_Healing.GetCount())
ObjectReference ThisREF = Alias_Healing.GetAt(iIndex)
If ((ThisREF as Actor).IsBleedingOut() == FALSE)
   (ThisREF as Actor).SetNoBleedoutRecovery(True) 
   Alias_Healing.RemoveRef(ThisREF)
   iIndex -= 1
EndIf
iIndex +=1
EndWhile
If  (Alias_Healing.GetCount() > 0)
   StartTimer(6) 
Endif
EndEvent

 

Fire & Forget MagicEffect script > Enchantment > Legendary Weapon OMOD

So if I understand you right this will help up my companions/NPCs when they are downed?

 

I'd probably need some more help to make a weapon out of your description. I assume that this will create a new legendary modification for weapons?

Link to comment
Share on other sites

Yes its part of a legendary omod. May not be the best way, but its what I got. Needs a quest ref collection alias to hold bleeding actors, magic effect, enchantment, omod.

 

If your not working with essential actors that bleedout like companions, you can drop the whole alias, bleedout and timer thing.

Link to comment
Share on other sites

Yes its part of a legendary omod. May not be the best way, but its what I got. Needs a quest ref collection alias to hold bleeding actors, magic effect, enchantment, omod.

 

If your not working with essential actors that bleedout like companions, you can drop the whole alias, bleedout and timer thing.

I have normal companions.

 

It would be amazing if you could provide sort of step by step tutorial.

Edited by JohnnyTest91
Link to comment
Share on other sites

1) Create a Spell "StimpakSpell" with all of the same effects and durations as the stimpak "potion."

 

2) Create a magic effect: fire and forget, contact, script

 

Create a new script on the magic effect:

 

Spell Property StimpakSpell Auto Const

 

Event OnHit(akTarget, akCaster)

 

If akTarget.HasSpell(StimpakSpell) == 0

akTarget.AddSpell(StimpakSpell)

Else

akTarget.RemoveSpell(StimpakSpell)

akTarget.AddSpell(StimpakSpell)

EndIf

 

EndEvent

 

Make sure you define the property of the script in the Creation Kit and point it to the right place for the stimpak spell.

 

3) Create an enchantment: give it your script magic effect.

 

4) Create your pistol. Give it your enchantment. Set it to non-hostile and 1 dmg. (I think you need at least 1 damage or it registers as "resisted" and won't take effect.)

 

5) For a little flavor maybe create a new ammo type, Stim Rounds, or something like that and then create a new constructible object so you can craft them somewhere.

Make sure you define the property of the script in the Creation Kit and point it to the right place for the stimpak spell.

 

If it isn't sufficient to bring a character out of bleedout, add something like:

 

akTarget.SetNoBleedOutRecovery(false)

Utility.Wait(15)

akTarget.SetNoBleedOutRecovery(true)

 

to the end of your script.

Edited by Guest
Link to comment
Share on other sites

  • Recently Browsing   0 members

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