I'm making a summonable genie-type character. I want it to work like this:
- Player summons invincible genie using staff
- Genie initiates dialogue with player
- Player makes wish (selects item, perk, skill, etc. from dialogue tree)
- Genie fulfills wish (adds item to inventory, increases skill, etc.)
- Genie fades out (does not play dying animation)
- Particle effect and custom sound play
I want the player to be able to summon an infinite number of genies at a time, and to be able to talk to them, so it seems I can't use the default conjuring spell. So instead I applied the duntransmogrifyanimal script
Scriptname SpawnMeeseeks extends activemagiceffect ACTORBASE PROPERTY meeseeks AUTOOBJECTREFERENCE objStoreOBJECTREFERENCE newRefStoremeeseeksdunTransmogrifyAnimal mainScriptEVENT onEffectStart(ACTOR akTarget, ACTOR akCaster) int rand = 0 objStore = akTarget akTarget.disable() newRefStore = akTarget.placeAtMe(meeseeks) ; //setting the master script to be the one with the stored vars mainScript = newRefstore AS meeseeksdunTransmogrifyAnimal mainScript.storedActor = objStore endEVENTEVENT onEffectFinish(ACTOR akTarget, ACTOR akCaster) ;newRefStore.disable() ;akTarget.moveTo(newRefStore) ;akTarget.enable() endEVENT
akspeaker.disable()akspeaker.Delete()
to the end result. That works, for the most part, but I still need it to play a particle effect and a sound when the guy goes away. I did notice that adding the script magiceffectsshadersonend
scriptName magicEffectShadersOnEndScript extends ActiveMagicEffect{Scripted magic effect for applying up to 3 Effect Shaders when the Spell Ends.}import utilityimport game;======================================================================================;; PROPERTIES /;=============/EffectShader property EffectShaderFX01 auto{main Effect Shader for spell}EffectShader property EffectShaderFX02 auto{2nd Effect Shader for spell}EffectShader property EffectShaderFX03 auto{3rd Effect Shader for spell}Float Property fDuration = 0.1 auto{How long do the shaders run. (Default = 0.1)};======================================================================================;; VARIABLES /;=============/;======================================================================================;; EVENTS /;=============/Event OnEffectFinish(Actor Target, Actor Caster) if EffectShaderFX01 != None EffectShaderFX01.Play(Target,fDuration) endif if EffectShaderFX02 != None EffectShaderFX02.Play(Target,fDuration) endif if EffectShaderFX03 != None EffectShaderFX03.Play(Target,fDuration) endifEndEvent
works to make particle effects play, but only if the character is killed. So adding akspeaker.kill() to the quest dialogue makes it work. The only problem with that is that I want the genie to be invulnerable, and not play a dying animation.
If anyone could possibly point me in the right direction, I'd really appreciate it. Thanks for reading this.