Scripted mini-blink help

Post » Tue Jan 27, 2015 11:50 pm

Event OnEffectStart(Actor akTarget, Actor akCaster)Float AngleXFloat AngleYFloat AngleZFloat PosXFloat PosYFloat PosZAngleX = Game.GetPlayer().GetAngleX()AngleY = Game.GetPlayer().GetAngleY()AngleZ = Game.GetPlayer().GetAngleZ()PosX = Game.GetPlayer().GetPositionX()PosY = Game.GetPlayer().GetPositionY()PosZ = Game.GetPlayer().GetPositionZ()Game.GetPlayer().TranslateTo(PosX , PosY, PosZ , AngleX, AngleY, AngleZ , 10000, 0)EndEvent

I want to make the Player character to blink 50 units behind himself when this effect happens. There's also the issue of clipping into terrain or going through walls that I don't know how to fix.

I'm using TranslateTo instead of MoveTo because MoveTo lags the game.

User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Wed Jan 28, 2015 12:08 am

TranslateTo doesn't blink. It does what its name implies. It translates, or slides an ObjectReference. And TranslateTo() bypasses collision on objects and removes collision on actors - that's why actors go through everything. I had found a way to return collision to actors, http://www.creationkit.com/Talk:TranslateTo_-_ObjectReference, but I still cant explain why it worked, and I haven't tried the method outside of a magic effect script.

An alternative to MoveTo is SetPosition() which also blinks. You can pass the same co-ords with GetPosition() stored variables into SetPosition().

Keep in mind, if the SetPosition, like MoveTo, is called and the distance is large enough, you will enter a load screen.

User avatar
Kill Bill
 
Posts: 3355
Joined: Wed Aug 30, 2006 2:22 am


Return to V - Skyrim