senterpat Posted November 19, 2014 Share Posted November 19, 2014 Is it possible to script objects so that you can spawn items based of their rotation and position? I'm working on a mod that open containers as doors, an allows you to see what your looting, I have the script to spawn leveled lists items and everything, but can think of a way to get the items to spawn on the shelves. I could do a dummy object like skyrim, but would rather not have to manually place each of those in every container. I'm not to great with angles and what have you, can't seem to wrap my mind around how I can get this to work. Link to comment Share on other sites More sharing options...
Hemingway308 Posted November 19, 2014 Share Posted November 19, 2014 It is definitely possible, but will probably take a while to figure out/perfect. With PlaceAtMe: http://geck.bethsoft.com/index.php?title=PlaceAtMe You can specify an offset, but unfortunately only along X or Y axis. You could workaround that by using GetPos + SetPos, GetAngle + SetAngle. Or by moving an XMarker around and using that for the PlaceAtMe. You'll need some math in there. You'll likely need to run the script over multiple frame, because PlaceAtMe and Movements aren't instantly to effect. --As an aside, NVSE 4.6 adds Events, you can use this to do an OnActivate trigger for containers without having to attach the object scripts to each one. Link to comment Share on other sites More sharing options...
Ladez Posted November 19, 2014 Share Posted November 19, 2014 As an aside, NVSE 4.6 adds Events, you can use this to do an OnActivate trigger for containers without having to attach the object scripts to each one. Wow, that sounds neat! Will this be possible with other block types as well? Link to comment Share on other sites More sharing options...
Hemingway308 Posted November 19, 2014 Share Posted November 19, 2014 Yes, just put something on the wiki about it, actually: http://geck.bethsoft.com/index.php?title=Event_Handling Its fun :). You can get the 4.6 beta here: http://forums.bethsoft.com/topic/1482519-beta-new-vegas-script-extender-nvse-v4/page-7 Link to comment Share on other sites More sharing options...
Ladez Posted November 19, 2014 Share Posted November 19, 2014 Interesting, I will have to look into that. Thanks! :) Link to comment Share on other sites More sharing options...
Recommended Posts