nn::nex::DORef::SetHard Member Function

Syntax

void SetHard();

Parameters

None.

Return Values

None.

Description

Sets DORef to a hard reference.

There are two kinds of references to duplicated objects: soft references and hard references. (References are hard by default.) At runtime, a reference can be changed from hard to soft, and vice versa. With a hard reference, the relationship with the object is always guaranteed and the local station maintains the newest state unless the DuplicatedObjectDeleteMainRef function is called. It is often necessary to select the appropriate reference type when fetching objects (using the DuplicatedObject::FetchDuplica function) that have no relationship to the local station. In contrast, a soft reference has no influence on the relationship to the object. The duplica is only updated when the duplication spaces feature determines that there is a relationship with the object. Select a hard or soft reference based on whether you want to maintain the most recent state of the referenced object.

For example, consider the following situation: The player is in a virtual world, and the player's teammates are in a different world. If you want to keep a list of the teammates' most recent states, such as their positions and personal belongings, and you want to update the objects (duplicas) to the most recent state at all times, then use hard references. In contrast, if it is not necessary for objects, such as enemy characters, to be updated constantly on the local station, you could use soft references to these objects. When you use a soft reference to an object, the object becomes subject to updating once it enters into a relationship with the local station, for example, when the object meets the duplication space conditions.

See Also

IsHard, IsSoft, SetSoft

Revision History

2011/04/13
Initial version.

CONFIDENTIAL