Base Objects vs References

Revision as of 17:57, 27 May 2008 by imported>Quetzilla (New page: =Under Construction= When starting (or re-starting) with scripting with OBSE, you are very likely to come upon the concepts of '''Base Objects''' and '''References'''. Both can be stored...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Under Construction

When starting (or re-starting) with scripting with OBSE, you are very likely to come upon the concepts of Base Objects and References. Both can be stored in reference variables but there are important differences. This page will explain each, as well as how to use them with regard to OBSE functions.

Overview

Base Objects include everything listed in the Object Window, as well as several things that can be accessed from the top menus of the Construction Set (such as Race, Hair, Magic Effects, etc.). A base object can never be found in the world while playing Oblivion.

Every object found in the world while playing (including NPCs, plants, bridges, and other things) is a reference. References are instances of base objects that have been placed in the world either directly in the Construction Set, or by scripts.

Use in Scripting

Prior to OBSE, every function in the scripting language that returned an object that could be stored in a reference variable returned a reference, that is, they returned an object that existed in the world.

OBSE adds functions that allow you to use and manipulate the base objects from which items in the world have been created. Many functions return the base objects themselves which can then be stored in reference variables