How to get the parent World Space of a cell?

Post » Fri Jun 25, 2010 6:59 am

Hi,

I try to find out in which worldspace an actor is. (Tamriel, ChorrolWorld etc.). But for some reason I always get 0 as result. I tested this in exterior cells. Any hint why I get 0 or how to get the World Spaces in another way?

Thx in advance:

set CurrentWorldSpaceRef to GetFirstRef 53 0
printtoconsole "WorldSpace: %i %n", CurrentWorldSpaceRef, CurrentWorldSpaceRef
set CurrentParentWorldSpaceRef to GetWorldSpaceParentWorldSpace CurrentWorldSpaceRef
printtoconsole "WorldSpaceParent: %i %n", CurrentParentWorldSpaceRef, CurrentParentWorldSpaceRef
User avatar
BethanyRhain
 
Posts: 3434
Joined: Wed Oct 11, 2006 9:50 am

Post » Fri Jun 25, 2010 8:40 am

Hi,

I try to find out in which worldspace an actor is. (Tamriel, ChorrolWorld etc.). But for some reason I always get 0 as result. I tested this in exterior cells. Any hint why I get 0 or how to get the World Spaces in another way?

Thx in advance:

set CurrentWorldSpaceRef to GetFirstRef 53 0
printtoconsole "WorldSpace: %i %n", CurrentWorldSpaceRef, CurrentWorldSpaceRef
set CurrentParentWorldSpaceRef to GetWorldSpaceParentWorldSpace CurrentWorldSpaceRef
printtoconsole "WorldSpaceParent: %i %n", CurrentParentWorldSpaceRef, CurrentParentWorldSpaceRef

There's no such thing as a reference to a worldspace, so passing 53 to GetFirstRef won't get you anything.
Try actor.GetParentWorldspace.
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Fri Jun 25, 2010 2:29 am

There's no such thing as a reference to a worldspace, so passing 53 to GetFirstRef won't get you anything.
Try actor.GetParentWorldspace.


Works, thank you
User avatar
Destinyscharm
 
Posts: 3404
Joined: Sun Jul 23, 2006 6:06 pm


Return to IV - Oblivion