Statics show up at weird angles

Post » Mon Nov 19, 2012 7:51 am

I have a spell that basically puts an enemy in a cage. Simple enough, but sometimes the cage shows up at funky angles, which usually allows for the captured actor to clip through. Anyone know how to stop this? Here's the script.

Scriptname PCKP_Script_GhostlyPrison extends activemagiceffect  Static Property Cage autoevent OnEffectStart(Actor T, Actor C)	ObjectReference Prison = T.PlaceAtMe(Cage, 1, false, true)	while T.GetHeight() > Prison.GetHeight() || T.GetWidth() > Prison.GetWidth() || T.GetLength() > Prison.GetLength()		Prison.SetScale(Prison.GetScale() + 0.10)	endWhile	float X = T.GetPositionX()	float Y = T.GetPositionY()	float Z = T.GetPositionZ()	Prison.SetPosition(X,Y,Z + (Prison.GetHeight()/2))	Prison.SetAngle(0,0,0)	Prison.enable(1)	T.SetPosition(X,Y,Z)	Utility.Wait(30)	Prison.disable()	Prison.delete()endEvent

So, a simple SetAngle(0,0,0) fixed it, but I'd still like to know what was going on.

Another problem: my setscale function seems to work fine for most things, but not really big guys. Dunno why, but the cage never shows up. Anyone have a clue how to fix?
User avatar
sarah taylor
 
Posts: 3490
Joined: Thu Nov 16, 2006 3:36 pm

Return to V - Skyrim