Creates a new edict (the basis of a networkable entity).
| Return type: | Entity object |
|---|---|
| Returns: | A valid Entity object on success, None otherwise |
An array-like object to access the datamaps of this entity:
>>> my_entity = my_client.entity
<Entity 2: 'player' at: 0xB00B5>
>>> my_entity.datamaps["a_datamap_key"]
"Valid datamap response!"
The send props of the entity in a nice array-like object. Viper is able to determine the type of the sendprop, and thus needs only the name of the property. For example, we can go back and forth between a gun and his owner over and over:
>>> weap = my_client.entity.sendprops["m_hActiveWeapon"]
<Entity 632: 'weapon_ak47' at: 0xBADD06>
>>> if my_client.entity == weap.sendprops["m_hOwner"]: print True
True
Snazzy, eh? It even supports arrays inside sendprops, so you can do my_client.entity.sendprops["m_hMyWeapons"][3]