Jump to content

Help with Scripting


Recommended Posts

Making a time slow mod that slows time to a near stand still using the "slow time" effect, and I've found a way to move and attack while at normal speed during the slow effect.

 

Trouble is I'm completely lost when it comes to scripting like this. The last time I did anything script wise was just opening and closing doors remotely, and that was on the NV GECK. Suffice it to say I have no idea what I'm doing.

 

Basically I want to temporarily mod the actor value to increase animation speed (tested in game using console command "player.setav 2d2 150" while under the effects of jet)

 

I've tried playing around with scripting but to no avail, mostly because I'm going in nearly blind. I've read some tutorials on papyrus scripting online but none of them give me any ideas.

 

I'm hoping that someone can help me in some way, even if it's just a little bit of advice or a pointer or something.

 

My question is how do I modify an actor value temporarily with a script? The script would be attached to an effect, which would be attached to a consumable (in this case jet). Any ideas how to start the script, what terms to use, anything helps honestly.

 

Thanks.

Link to comment
Share on other sites

Just to get you started try attaching this to the slow time magic effect.

ScriptName Derp extends ActiveMagicEffect
; http://www.creationkit.com/fallout4/index.php?title=Actor_Value

float OriginalValue
float EffectValue = 150.0 const

; Events
;---------------------------------------------

Event OnEffectStart(Actor akTarget, Actor akCaster)
	; Gets the specified Actor Value from the Object Reference.
	OriginalValue = akTarget.GetValue(AnimationMult)

	; Sets the base value specified Actor Value on the Object Reference to the passed-in value. Any modifiers are left intact.
	akTarget.SetValue(AnimationMult, EffectValue)

	Debug.MessageBox("Set the speed multi:"+EffectValue)
EndEvent


Event OnEffectFinish(Actor akTarget, Actor akCaster)
	; restore the value to what it was before this effect started.
	akTarget.SetValue(AnimationMult, OriginalValue)

	Debug.MessageBox("Restored the original speed multi:"+OriginalValue)
EndEvent


; Properties
;---------------------------------------------

Group Properties
	ActorValue Property AnimationMult Auto Const Mandatory
EndGroup

Link to comment
Share on other sites

  • Recently Browsing   0 members

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