CBlob

From King Arthur's Gold Wiki
Revision as of 16:10, 31 January 2016 by Vermilicious (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

CBlob is most common networked object in game that can be interacted in some way.


Methods:

Method Description
exists

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

get_(type)

Retrieves a value of a certain type

set_(type)

Stores a value of a certain type.

Sync

Synchronizes a property value over the network.

getPosition

Returns a Vec2f value with current blob's position.

setPosition

Sets a new position for the blob.

getVelocity

Returns a Vec2f value with current blob's velocity.

getOldVelocity


setVelocity

Sets a new velocity for the blob.

AddForce


getRadius

Retrieve this blob's radius

getWidth


getHeight


getMass


SetVisible

Sets blob's visibility in the world.

SetDead

Sets blob dead.

Die


isActive


SetActive


Settle

Settles object in physical world.

UnSettle

Unsettles object in physical world.

getPostionWIthOffset


getScreenPos


isFacingLeft

Returns true if blob is facing left, false if blob is facing right.

SetFacingLeft

Sets blob's facing to left or right, depending on boolean parameter

isOnGround

Returns true if blob is on ground, false if blob is in air.

isOnLadder

Returns true if blob is on the ladder, false otherwise.

isOnWall


isOnCeiling


isInAction


isSnapTodGrid


RemoveScript


AddScript


PutInInventory


PutOutInventory


RemoveFromInventories


canBePutInInventory


isInventoryAccessible


SetQuantity


getQuantity


getInventoryName


RenderForHUD


getTouchingCount


getTouchingByIndex


getTouchingOffsetByIndex


getTouchingOffsetByBlob


setTouchingOffsetbyBlob


setTouchingOffsetbyIndex


isTouching


getAttachmentPointCount


getAttachmentPoint


DetachFrom


DetachAll


DetachFromAll


isAttachedTo


isAttached


getAbsoluteAttachemntPoint


getCarriedBlob


PutCarriedInventory


DropCarried


Throw


ShootBlob


AttachTo


CreateGenericButton


ClearMenus


ClearGridMenus


ClearButtons


ShowInteractButtons


ClickInteractButton


ClickClosestInteractButton


CreateInventoryMenu


ShowPickupButtons


CreateBubbleMenu


ShowBubble


ClearBubbleMenu


isInWater


getProperties


ClickGridMenu


getSprite


getShape


getMovement


getWeapon


getBrain


getAttachments


getInventory


Pickup


PickupIntoHands


PickupIntoInventory


getNetworkID


getTeamNum


setTeamNum


getTeam


getSkinNum


getHeadNum


getSexNum


getName


isMyPlayer


getControls


isKeyPressed


wasKeyPressed


isKeyJustPressed


isKeyJustReleased


setKeyPressed


getAimPos


setAimPos


getMapTile


isMapBlock


canBePlacedAt


Hit


HitMap


Damage


Heal


getHitInfosFromArc


getHitInfosFromRay


getHitInfosSize


getHitInfoByIndex


SetDamageOwnerPlayer


getRespawnPosition


CreateRespawnPoint


ModifyRespawnPoint


PlugPlayer


UnplugPlayer


MoveBlobStuffTo


getPlayer


SetTimeToDie


SendCommand

Sends a command over the network.

Tag

Turns on a basic boolean flag.

Untag

Turns off a basic boolean flag

hasTag

Checks if a basic boolean flag has been set.

AddScriptObject


DeleteScriptObject


DeleteScriptObjectByIndex


AddScriptObjectGroup


getScriptObject


getScriptObjectGroupSize


getScriptObjectsArray


GetScriptObjectsArray


Properties:

Property Type Description
shape CShape@ Reference to the blob's shape object.
health f32
defaultHealth f32
inventoryIconFrame int
inventoryMaxStacks int
inventoryFramDimension dimension2di
inventorySlots dimension2di

Hooks:

Signature Description
void onInit(CBlob@ this) Called on initialization.
void onTick(CBlob@ this) Called on every tick.
f32 onHit(CBlob@ this, Vec2f worldPoint, Vec2f velocity, f32 damage, CBlob@ hitterBlob, u8 customData) Called on every hit.
bool canBePickedUp(CBlob@ this, CBlob@ other) Called on pickup check.
bool doesCollideWithBlob(CBlob@ this, CBlob@ other) Called on collision check.
void onCollision(CBlob@ this, CBlob@ other, bool solid, Vec2f normal, Vec2f point) Called on collision.
void onDie(CBlob@ this) Called on death.