Making a summonable character that can be talked to...

Post » Sat Mar 01, 2014 11:56 pm

I'm making a summonable genie-type character. I want it to work like this:

  1. Player summons invincible genie using staff
  2. Genie initiates dialogue with player
  3. Player makes wish (selects item, perk, skill, etc. from dialogue tree)
  4. Genie fulfills wish (adds item to inventory, increases skill, etc.)
  5. Genie fades out (does not play dying animation)
  6. 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

Spoiler
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

to a modified conjuration magic effect, instead of using the "assoc. item dropdown" to select the summoned character. Also, to make the character go away, in the dialogue quest, I added

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

Spoiler

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.

User avatar
James Wilson
 
Posts: 3457
Joined: Mon Nov 12, 2007 12:51 pm

Return to V - Skyrim