This time with the following: I made a spell that is supposed to teleport you to a cell i made, and upon casting it again teleport you back.
It does teleport you, but as soon as you arrive, you are teleported back instantly.
This is my script, it is a little long and has a few things not related to the teleporting directly, but they are still necessarry for my spell so sorry if it is a little confusing.
Also the "UseBlindness" Check is there because i use the same script (with different Globals though so they don't screw each other up) for a spell that transports any NPC(except of dragons) you look at while triggering the spell to the same cell and holds them there for a while. If UseBlindness is true then it is only for the spell that sends NPC's there. If False for the spell that teleports the PC.
The problem occurs for both Spells though, NPC's are only send there for a second and then transported back instantly again too.
Scriptname A0KamuiScript extends activemagiceffectGlobalVariable Property Blindness AutoGlobalVariable Property InUse AutoGlobalVariable Property Uses AutoGlobalVariable Property sharinuse AutoImageSpaceModifier Property BlindnessFX AutoBool Property UseBlindness AutoObjectReference Property Marking AutoObjectReference Property CellMarker AutoCell Property CellCheck AutoActor Property Target Auto Hiddenevent OnEffectStart ( Actor akTarget, Actor Caster )if InUse.getvalue() == 0 If Caster.getav("Magicka") >= 100 Caster.damageav("Magicka",100) Target = akTarget if (Target.GetParentCell() != CellCheck) If UseBlindness == true Target.SetAlert(false) EndIf Marking.MoveTo (Target) Target.MoveTo (CellMarker) InUse.setvalue(1) Uses.setvalue(Uses.getvalue() + 1) Endif EndIf If UseBlindness == true if sharinuse.getvalue() == 1 if Blindness.getValue() <= 1.2 Blindness.mod(0.005) EndIf BlindnessFX.remove() BlindnessFX.apply(Blindness.getvalue()) EndIf EndIfElseif InUse.getvalue() == 1 self.dispel()EndIfEndEventevent OnEffectFinish ( Actor akTarget, Actor Caster )if (Target.GetParentCell() == CellCheck) Target.Moveto (Marking) InUse.setvalue(0)EndIfEndEvent
I hope anyone can help me there. I bet it is something tiny and dumb that i simply don't find.
EDIT: Also, does someone know how to make a armor that makes one look like a skeleton as long as you wear it?