Author Topic: Executing functions for specific brick datablocks  (Read 354 times)

For example I made this function for a specific brick I made:

Code: [Select]
function FuelDepotBrickData::useStructure(%data, %player)
{
//dostuff
}

How will I execute it on all bricks having this datablock? I want to have the same effect as with onPlant,onActivate,onDeath, etc.


When one of these bricks is added, add it to a list or a group and then loop through that list or group and call the function for each one.