Component::getBlob

From King Arthur's Gold Wiki
Jump to: navigation, search

Returns a reference to the CBlob that owns this object. It is a method common to several object types that are considered 'components'.


This very simple method is useful anywhere you want to perform some action on the CBlob that owns the component you're working with rather than the component itself.

CBlob@ getBlob()

Example from Entities/Characters/Scripts/BuilderInventory.as:

if (this.hasRequirements( reqs, missing ))
{
  this.TakeRequirements( reqs );
  CBlob @shopBlob = CreateBlob( "genericblock", "Entities/Workshops/Base/WorkshopWAR.cfg", 0, this.getBlob().getPosition() );
  this.getBlob().Pickup( shopBlob, false );}

Object method of: CInventory, CAttachment, CBrain, CMovement, CShape, CWeapon