SetPackageLocationData

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
< [[::Category:Functions|Category:Functions]]

A function added by the Oblivion Script Extender.

Syntax:

(success:bool) SetPackageLocationData package:ref data:StringMap

Sets the location of a package based on the passed stringmap of the same format as that returned by GetPackageLocationData. Omitted fields retain their existing values.

Example

array_var MyStringmap
...
let MyStringmap := ar_construct stringmap
let MyStringmap["Object"] := MyNewReference
SetPackageLocationData MyFindPackage MyStringmap

Or get and change the settings returned from GetPackageLocationData

array_var MyStringmap
...
let MyStringmap := GetPackageLocationData MyFindPackage 
let MyStringmap["Object"] := MyNewReference
SetPackageLocationData MyFindPackage MyStringmap

Notes

  • It is advisable to provide all the array entries (as in the second example) because, although the OBSE docs state that omitted fields retain their existing values, this function does not seem to work when some fields are omitted from the array (as of OBSE 20).

See Also