List Data Container


List Data Container

This component is a glorified array collection. It is mainly used so that it is easy for you to access a list of items inside of GameBuilder Studio and for other component to respond to changes in the list data. This is a dynamic component but objects should be added in editor. You can't change the property names but you can change the value. all properties are in sequential order starting from 0 with the naming convention of "itemX". You can access values on this component from property references or expressions.


var entity : IEntity = PBE.allocateEntity();

var listData : ListDataComponent = new ListDataComponent();
listData.push( 100 );
listData.push( 1000 );
entity.addComponent( listData, "ListData");

var properVal : int = new PropertyReference( "@ListData.item0" );
trace("Property Value = " + properVal); //Prints 100

Follow Us For Updates