PlaceItem Problem

Post » Sun Aug 09, 2009 2:20 pm

I'm trying to do some work with the PlaceItem command.


I have an Object A which will find its z-angle, figure out a unit vector in that direction, and travel along that line. I have independently verified that this object works precisely as expected.

I have an Object B which places instances of Object A at incremental angles using PlaceItem. They are all placed at the same X,Y,Z location, but the Z_Rot specified is altered. The idea is that as the objects are expanding outward like a circular wave front.



The problem is that PlaceItem seems to break down. I've tried going from 0 to 360 degrees, -180 to 180 degrees, and the same ranges in minutes (MWSFD seems to indicate that it might require minutes, but this didn't seem right). I've tried angles between -10000 and 10000, even, and the same problem always persists: only the first hemisphere (0 to 180 degrees) actually gets populated. The maximum sweep of the circle never gets beyond halfway, even though the z-angle variable continues to increment.

Is there some sort of limit with PlaceItem? Some reason I can't get a full 0 to 360 degree sweep with the Z_Rot parameter to actually work as expected?
User avatar
Harry-James Payne
 
Posts: 3464
Joined: Wed May 09, 2007 6:58 am

Post » Sun Aug 09, 2009 4:09 am

You gotta use minutes. So if you wanted them to face a at the 90 degree mark(East or w/e location that is) you gotta multiply 60x90 or if you wanted it at the 180 degree mark you gotta do 60x180. That goes up to 360 degrees with each 90 degree mark.(x-y cordinate plane) Not sure if you can make an npc face like at the northwest location it may only accept N S E and W values. I'm not sure what exactly you're trying to do if you were just wanted the items to face at different directions, but if you wanted the items to change angles as well that's different than having them face a certain direction. From what i understand it only accepts values up to 180 degrees(z-xy cordinate plane) if you wanted the item to be positioned to where its above 180 degrees all you would have to do is change the direction it's facing. Meaning once it's at 0 or 180 degrees(not sure which one is which haven't tested this) it will be standing up. So if you wanted it 181 degrees you would change the direction it's facing and start a new 0-180 angle degree. Don't know if you got all that. I personally haven't ever used these commands but that's what i got out of it from MSFD. Also, when setting an angle you want to use degrees not minutes.
User avatar
Amanda Leis
 
Posts: 3518
Joined: Sun Dec 24, 2006 1:57 am

Post » Sun Aug 09, 2009 8:22 am

...Not sure if you can make an npc face like at the northwest location it may only accept N S E and W values...


This part, I am positive, is not the case. I've definitely gotten values in between the cardinal directions. I'm almost entirely positive, too, that despite what MWSFD says it accepts degrees and not minutes.

...From what i understand it only accepts values up to 180 degrees(z-xy cordinate plane) if you wanted the item to be positioned to where its above 180 degrees all you would have to do is change the direction it's facing...


This is probably what I need to do, but I'm not sure yet how I want to go about it. I have a few workaround ideas, but I'd prefer to attack the problem at the source if I can figure out a way.


Back to testing PlaceItem =(. Thanks for the input though!
User avatar
Hazel Sian ogden
 
Posts: 3425
Joined: Tue Jul 04, 2006 7:10 am


Return to III - Morrowind