Jump to content

how do we add special effects to a summon or banishment?


tonycubed2

Recommended Posts

I have yet to see a tutorial or wiki on adding special effects in a script. LIke I would love to have a thunderbolt or glowing lights or SOMETHING visual happen when I have a script summon skeletons, npcs, etc. But I find no place that talks about it. What would be the script to just have lighting or fire appear for a few seconds while a creature is spawned or banished? And I guess sound is separate as well?

 

Thanks for any hints.

Link to comment
Share on other sites

Thanks for idea. Spent a couple of hours studying it. There is a script attached to a magic effect, but taking just the script and using the commands i it do not fire off the effects. Something is missing. I tired (with properties deffined copied from Wabbajack):

 


Event OnEquipped(Actor akActor) 
Game.GetPlayer().placeAtMe(visualExplosion)
PlayerRef = Game.GetPlayer()
dudeInstance = Game.GetPlayer().PlaceActorAtMe(sanddude,1)
explosionMarker.setPosition(dudeinstance.x, dudeinstance.y, (dudeinstance.z + 75))
dudeInstance.placeAtMe(visualExplosion)
dudeInstance.addSpell(ghostSpell)
dudeInstance.setGhost(TRUE)

endEvent

Link to comment
Share on other sites

Yup, I did. I am careful with that. But no effects AT ALL. I need the effects to be on the summoned npc, though. Not the player. I do not know what is the minumum needed for the special effects to work. maybe I have to make a spell with them and cast the spell? I can't figure it out. Been looking at scripts all day.
Link to comment
Share on other sites

I used the visual explosion in a script, and it worked fine. It's also a magic effect for an enchantment like the Wabbajack, but I don't think that has anything to do with it... Here's the script if you want to take a look:

 

Scriptname fg109TutorialBowMEScript extends ActiveMagicEffect
{A script for a weapon enchantment that does random things like the Wabbajack.}


;;;;;;;;;;;;;;;;
;; Properties ;;
;;;;;;;;;;;;;;;;

Activator property Rock auto
Actorbase property Werewolf auto
Actorbase property MudCrab auto
Weapon property Pickaxe auto
Explosion property VisualExplosion auto


;;;;;;;;;;;;;;;
;; Functions ;;
;;;;;;;;;;;;;;;

Function FlyOff(Actor akActorRef)

akActorRef.TranslateTo(akActorRef.X, akActorRef.Y, akActorRef.Z + 250, 0, 0, 0, 500, 0)
Utility.Wait(0.5)
akActorRef.StopTranslation()
akActorRef.ApplyHavokImpulse(Utility.RandomFloat(-1, 1), Utility.RandomFloat(-1, 1), 0, akActorRef.GetMass() * 500000)

EndFunction


;;;;;;;;;;;;
;; Events ;;
;;;;;;;;;;;;

Event OnEffectStart(Actor akTarget, Actor akCaster)

if (akTarget == Game.GetPlayer())
	Debug.Notification("You resist the effects of the enchantment.")
	Return
endif

int RandomEffect = Utility.RandomInt(1, 5)

if (RandomEffect == 1)	;turn into rock
	akTarget.PlaceAtMe(VisualExplosion)
	akTarget.Disable()
	akTarget.PlaceAtMe(Rock, 1)

elseif (RandomEffect == 2)	;raise in air, fling in random direction
	akTarget.PlaceAtMe(VisualExplosion)
	FlyOff(akTarget)

elseif (RandomEffect == 3)	;transform to werewolf
	akTarget.PlaceAtMe(VisualExplosion)
	akTarget.Disable()
	ObjectReference tempref = akTarget.PlaceAtMe(Werewolf, 1)
	akTarget.RemoveAllItems(tempref)
	tempref = None

elseif (RandomEffect == 4)	;change player into mudcrab
	akCaster.PlaceAtMe(VisualExplosion)
	ObjectReference tempref = akCaster.PlaceAtMe(Mudcrab, 1)
	(tempref as fg109TutorialMudcrabScript).StartEffectOn(akCaster)
	tempref = None

elseif (RandomEffect == 5)
	akTarget.PlaceAtMe(VisualExplosion)
	akTarget.Disable()
	ObjectReference tempref = akTarget.PlaceAtMe(PickAxe, 1)
	tempref.MoveTo(akTarget, 0, 0, 50)
	(tempref as fg109TutorialPickaxeScript).StartEffectOn(akTarget)
	tempref = None

endif

EndEvent

Link to comment
Share on other sites

  • Recently Browsing   0 members

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