View previous topic :: View next topic |
Author |
Message |
xtrick8
Joined: 31 Jul 2006 Posts: 8 Location: Melbourne, Australia
|
Posted: Mon Jul 31, 2006 16:35 Post subject: Store all placeables in an area script |
|
|
Just wondering is there a way to store all the placeables in an area, including their location and orientation ?
I am using APS for the persistence in our mod, successfully saving player locations, storage, housing etc..., but cannot see how to store both the object and the location.
What I really want to be able to do is onenter an area, delete all placeables and load them from the DB. onexit an area, save all placeables to the database.
Thanks in advance. _________________ - xtrick8 (Lead Writer for Noreshia)
http://www.noreshia.com/ |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Mon Jul 31, 2006 17:11 Post subject: |
|
|
Its a two step process....
First, you store the object. I actually used the default DB for this one instead; it was easier for me to use and worked fine.
Then you store the location with SetPersistentLocation.
You need to use a variable scheme that makes it easy to tie the object and the location together. To make it easier to determine what objects are in what area I would suggest looking at using a different table per area. Check for existance and create the table if it doesn't exist, store the information for the placeables afterwards. Make sure your areas are unique tags also, I have always used edge-to-edge transitions so my areas are all laid out in a grid with tags like p50p50p00 to show where they are in relationship to each other.
There is a sample persistent placeable script on the Vault that I modified for my use, you should be able to use it as an example:
http://nwvault.ign.com/View.php?view=scripts.Detail&id=2778
Luck! |
|
Back to top |
|
|
xtrick8
Joined: 31 Jul 2006 Posts: 8 Location: Melbourne, Australia
|
Posted: Tue Aug 01, 2006 1:35 Post subject: |
|
|
Yeah had a look at that one and also the furniture mod which both seem to use the standard bioware functions to store the object with the location. I am a little confused about how to convert this code over to use APS. Also if I understand this correctly you need to restore the item, then destroy it and then place it so that it is a placeable.... _________________ - xtrick8 (Lead Writer for Noreshia)
http://www.noreshia.com/ |
|
Back to top |
|
|
|