Worlds Page

From C4 Engine Wiki

Jump to: navigation, search

The Worlds Page is a tool page in the C4 Engine World Editor. It can be displayed by selecting Worlds from the Page menu.

Shown below, the Worlds Page contains tools that pertain to placing, selecting, and modifying instanced worlds.

Image:page_worlds.png

The button in the upper-left corner with the world icon on it selects the instance placement tool. This tool is used for placing new instance nodes in the world that do not yet have any referenced world associated with them. Once a new instance node has been placed, the world to which it refers can be set by opening the Node Info window and setting a world name under the Instance tab. If the Show Instanced Worlds toggle button at the top of the World Editor is enabled, then the referenced world will appear in the scene when the Node Info window is closed. The name of the referenced world will also appear in the world list inside the Worlds Page.

Selecting an item in the world list is like selecting the instance placement tool, except that each new instance node placed in the world is preconfigured to refer to the world that is highlighted. This is useful for quickly placing many instances of the same referenced world in a scene. It is possible to select multiple items in the world list simultaneously by holding in the Shift key while clicking on them. When multiple worlds are selected, one is chosen at random each time you click in the scene to place a new instance node.

When a instance node is placed in the scene, its transform is affected by the settings in the Placement Page.


Menu Commands

The menu button in the upper-right corner displays a menu of commands when clicked.

Command

Description

Cleanup

This command causes the world list to be updated so that it contains every distinct instanced world in the scene and only those worlds. Any world in the list that is not being used by an instance node in the scene is removed.

Select All

This command selects all instance nodes in the scene that refer to the highlighted world(s). Double-clicking on an item in the worlds list also selects all of the corresponding instance nodes in the scene. (This command is disabled is no worlds are selected in the worlds list.)

Select Some...

This command selects a certain percentage of all instance nodes in the scene referring to the highlighted world(s) to be selected at random. A dialog box appears to let you enter the percentage you would like to select. (This command is disabled is no worlds are selected in the worlds list.)

Replace Selected

This command causes all selected instance nodes in the scene to refer to the world highlighted in the world list. This is useful for quickly changing the world referenced by a large number of instance nodes. The same effect can also be accomplished by opening the Node Info window and changing the world name. (This command is enabled when exactly one world is selected in the worlds list.)


Rigid Bodies

An instanced world may contain one or more rigid bodies controlled by the physics systems. If the engine finds any rigid body controllers (or any subclasses of a rigid body controller) assigned to top-level nodes in the instanced world, then all of the nodes are extracted from the instanced world and placed directly in the referencing world. (This only happens when a world is played, not in the editor.) The instance node is then deleted. Any properties that were attached to the instance node are transferred to the first rigid body in the instanced world as it is being extracted. Likewise, any connectors in the referencing world that were connected to the instance node are transferred to the first rigid body in the instanced world.

When the world is saved (as a saved game), extracted rigid bodies are saved as part of the main world so that they can be restored in the same state that they were in when the game was saved. In contrast, ordinary instanced worlds that don't contain any rigid bodies are simply saved as the instance nodes in the main world, and they are reloaded from the separate world resources when the main world is restored.


See Also