Entity::data

From RAGE Multiplayer Wiki
Revision as of 06:51, 21 December 2018 by Flow (talk | contribs) (Clearification about setVariable and entity.data)

This property is used to get or set entity data.

FALSE: Changing this property has the same effect as using entity.setVariable function.
TRUE: if you use setVariable you have to use getVariable to get results. e.g. you can't do entity.setVariable('foo','bar') and get the result with entity.data.foo as getter. You can do so clientside, but not serverside.

Property Type(s) & Attribute(s)

  • Getter - attribute should be in any format.
  • Setter - attribute should be in any format.

Example(s)

Server-Side

The code below is an example about how to set a entity data by directly manipulating its "data" attribute.

entity.data.foo = bar;