Difference between revisions of "CBlob::exists"

From King Arthur's Gold Wiki
Jump to: navigation, search
(Description)
Line 7: Line 7:
 
bool exists(const string &in)
 
bool exists(const string &in)
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
  
 
Example from C:\KagScripting\Base\Entities\Common\FireScripts\HOTHOTHOT.as
 
Example from C:\KagScripting\Base\Entities\Common\FireScripts\HOTHOTHOT.as

Revision as of 00:42, 29 September 2012

Returns a a bool indicating whether or not this blob has given property.


Normally you want to use this to make sure that blob has a property initialized, which you want to use.

bool exists(const string &in)


Example from C:\KagScripting\Base\Entities\Common\FireScripts\HOTHOTHOT.as

if (blob.getProperties().exists("burn_time"))
{
     u8 burn_time = blob.getProperties().get_u8("burn_time");
     ...
}

Object method of: CBlob