Jump to content

Need a script because I suck at them


Recommended Posts

I'm planning on making a new mod. However, while I'm pretty good at moving things around in the Creation Kit, I absolutely SUCK at scripts. Maybe because it's beyond me, or maybe I'm too old. However, if there are any modders out there that can help me with this, I'd really appreciate it, and of course, give you credit when I release the mod to the Nexus.

 

I need a script that I can apply to an activator. Upon activation, I need three things to happen:

 

1. The activator applies a perk to the PC.

2. The activator disappears (disables) in a bright effect just like Sagittarius22's Summonable Voiced Ethereal Chest. (I think I've seen the effect in game before, but I can't remember where at the moment.)

3. The PC is knocked backwards as if he was Fus Ro Dah-ed.

 

If anyone could possibly help, thank you.

Link to comment
Share on other sites

I guess that by PC you mean the Player.

 

 

Perk Property MyPerk Auto
 
EffectShader Property BanishVFX Auto

Auto State Waiting 
Event OnActivate(ObjectReference akActionRef)       
     If (akActionRef == GameGetPlayer())     ; Only the Player can activate this          
         GoToState("Activated")               ; After first activation it cannot be reactivated     
         akActionRef.AddPerk(MyPerk)          ; The PERK to add to the Player          
         BanishVFX.Play(Self)                 ; The visual FX to Play on the activator          
         Utility.Wait(1.5)                    ; we give some time so that the VFX can be seen          
         Self.PushActorAway(akActionRef, 10)  ; the Activator  Pushes away the Player          
         Self.Disable(True)                   ; we disable the Activator Fadeing it IN          
         Utility.Wait(0.1)                    ; just as a precaution for different reasons 
         BanishVFX.Stop(Self)                 ; we STOP the VFX before deleting          
         Self.Delete()                        ; we DELETE the Activator 
EndIf 
EndEvent 
EndState     

State Activated 
Event OnActivate(ObjectReference akActionRef)       
; Do Nothing 
EndEvent 
EndState

 

 

 

You need to find a suitable visual FX to play on the activator, this needs some searching and testing on your side.
* Some EffectShaders will only play on actors.
* Remove everything written after the ; , it's just a description so you can see what does what.
* I don't know what you mean by...
" in a bright effect just like Sagittarius22's Summonable Voiced Ethereal Chest"
If you want an explosion to occur instead of a visual FX on the activator, just say so and it will be moddify.
Edited by maxarturo
Link to comment
Share on other sites

The functions that i see in the video are the same, the supposed explosion is not an explosion but it's either an "ImageSpace Modifier" or a "Camera Attach FX", either way i don't recognise it as a vanilla (but i could be wrong, i don't know them all by heart).

I'm guessing it's must be a custom made VFX.


I'll take a more careful look at it tomorrow, right now i'm too tired and i'm going to bed.


PS: the explosion seems to me more suitable and realistic for your situation.

Edited by maxarturo
Link to comment
Share on other sites

The visual FX is based on a vanilla FX but it has been altered also the vanish Activator is based on the vanilla unsommon 'Activator' but it's also using custom texture fx.

In order to achieve what the video shows you need to make the same changes to the same objects and then add them to the game/ck.



* But again i could be wrong, i don't know all and every vanilla FX by heart.

80% of the FXs i use are all custom made so there is a big chance i could be wrong about those particular one.




Here is the explosion script version with some small tweaks/extras:




Perk Property MyPerk Auto
{The PERK to add to the Player}

Message Property MyPerkMSG Auto
{The message that notifies the player that the perk has been added}

Explosion Property BanishExploFX Auto
{The Explosion that will occur at the Activators location}

Sound Property BanishExploSFX Auto
{The extra explosion SOUND FX that will play along side the explosion FX}

EffectShader Property BanishVFX Auto
{The Visual FX that will play on the activator before the explosion occurs}

Auto State Waiting
Event OnActivate(ObjectReference akActionRef)
If (akActionRef == GameGetPlayer())
GoToState("Activated")
akActionRef.AddPerk(MyPerk)
BanishVFX.Play(Self)
Utility.Wait(2.0)
Self.PlaceAtMe(BanishExploFX, 1)
BanishExploSFX.Play(akActionRef)
Self.PushActorAway(akActionRef, 10)
Self.Disable(True)
Utility.Wait(0.1)
BanishVFX.Stop(Self)
MyPerkMSG.Show()
Self.Delete()
EndIf
EndEvent
EndState

State Activated
Event OnActivate(ObjectReference akActionRef)
; Do Nothing
EndEvent
EndState




* The reasonable "Push Player" force value are from 5 to 10, so if you find that 10 is way too much, then change the value in this line:

Self.PushActorAway(akActionRef, 10)


* Read carefully the description under each property, and fill in the properties correctly.

Edited by maxarturo
Link to comment
Share on other sites

  • Recently Browsing   0 members

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