Home
Products
Community
Manuals
Contact
Login or Signup

Blitz3D Docs -> 3D - A-Z -> N -> NameEntity

NameEntity entity,name$

Parameters:

entity - entity handle
name$ - name of entity

Description:

Sets an entity's name.

See also: EntityName.


Comments

Zethrax(Posted 1+ years ago)
NameEntity entity, namestring$ - Sets the namestring of the specified entity.
EntityName( entity ) - Returns the specified entity's namestring.

The namestring is just an ordinary string value. You can use it for whatever you want.

Most modelling programs allow you to set the namestrings of the various parts of a model, so you can use the namestrings, in combination with functions such as FindChild, to search the entity hierachy of a multi-part model for a particular entity within that hierarchy.

You can also use the namestring to store data, or references to data, within an entity. You may wish to store an array index which indexes one or more arrays which contain data about a particular group of entities, for example. You can also use the namestring in combination with the (undocumented) Handle and Object commands to store the handle for a Blitz custom Type. This can be extremely useful when you need to access the custom data associated with an entity that had its entity handle returned as part of a collision, pick, or similar operation.


Blitz3D Manual Forum

BlitzPlus Equivalent Command