Jump to content

Need some Scripting help


Brandon007

Recommended Posts

Hello everyone. Working on a really neat weapon for FO4, and Im having the smallest cosmetic issue with my script.

 

The projectile and everything works so far, but the projectiles of the weapons using this script still remain after the explosion has been spawned.

ScriptName Spartan_Plasma_TimedExplosion extends activemagiceffect

;-- Properties --------------------------------------
Explosion Property PlasmaExpl Auto Const
Sound Property SoundEffect  Auto

;-- Variables ---------------------------------------

;-- Functions ---------------------------------------

Event OnEffectStart(Actor akTarget, Actor akCaster)
	Actor Target = akTarget
	Utility.Wait(3)
	SoundEffect.Play(akTarget)
	Utility.Wait(0.5)
	Target.PlaceAtMe(PlasmaExpl as Form, 1, False, False, True)
        Dispel()
EndEvent

Anyone know how to have the script remove the projectile after the Target.PlaceAtMe line?

 

The script has to work for multiple different projectiles >-<

Link to comment
Share on other sites

You might cast the projectile as a reference first, saying adding

 

Form kPlasmaExplosion = PlasmaExp

Player.PlaceAtMe(kPlasmaExp)

Utility. Wait(time it takes for explosion that you know)

kPlasmaExplosion.Delete()

 

Etc etc

 

I'm not familiar with projectiles and script for them but I do similar thing to clean up actors. On my phone typing this so hopefully. It makes sense

Link to comment
Share on other sites

  • Recently Browsing   0 members

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