GameObject

EEex_GameObject_ApplyEffect

Instance Name: applyEffect

Summary

Applies an effect to the given object based on the args table.

Parameters:

Name

Type

Default Value

Description

object

CGameObject

The object to apply the effect to.

args

table

The table that describes the effect to apply.

Valid keys for the args table are as follows:

Name

Default Value

Description

diceSize

0

As per offset [+0x3C] of .EFF v2.0.

duration

0

As per offset [+0x28] of .EFF v2.0.

durationType

0

As per offset [+0x24] of .EFF v2.0.

dwFlags

0

As per offset [+0x20] of .EFF v2.0.

effectAmount

0

As per offset [+0x1C] of .EFF v2.0.

effectID

<ERROR>

As per offset [+0x10] of .EFF v2.0.

effectList

0

If 1, adds the effect to the sprite’s timed list.
If 2, adds the effect to the sprite’s equipped list.

immediateResolve

0

Determines whether the engine immediately applies the effect during the
function call, or the next time the sprite’s effect list is processed.

m_casterLevel

0

As per offset [+0xC8] of .EFF v2.0.

m_effectAmount2

0

As per offset [+0x60] of .EFF v2.0.

m_effectAmount3

0

As per offset [+0x64] of .EFF v2.0.

m_effectAmount4

0

As per offset [+0x68] of .EFF v2.0.

m_effectAmount5

0

As per offset [+0x6C] of .EFF v2.0.

m_flags

0

As per offset [+0x5C] of .EFF v2.0.

m_maxLevel

0

As per offset [+0x58] of .EFF v2.0.

m_minLevel

0

As per offset [+0x54] of .EFF v2.0.

m_projectileType

0

As per offset [+0xA0] of .EFF v2.0.

m_res2

""

As per offset [+0x70] of .EFF v2.0.

m_res3

""

As per offset [+0x78] of .EFF v2.0.

m_school

0

As per offset [+0x4C] of .EFF v2.0.

m_scriptName

""

As per offset [+0xA8] of .EFF v2.0.

m_secondaryType

0

As per offset [+0xD0] of .EFF v2.0.

m_slotNum

0

As per offset [+0xA4] of .EFF v2.0.

m_sourceFlags

0

As per offset [+0x9C] of .EFF v2.0.

m_sourceRes

""

As per offset [+0x94] of .EFF v2.0.

m_sourceType

0

As per offset [+0x90] of .EFF v2.0.

noSave

0

If true, the effect bypasses any immunities the sprite might have to its application.

numDice

0

As per offset [+0x38] of .EFF v2.0.

probabilityLower

0

As per offset [+0x2E] of .EFF v2.0.

probabilityUpper

100

As per offset [+0x2C] of .EFF v2.0.

res

""

As per offset [+0x30] of .EFF v2.0.

saveMod

0

As per offset [+0x44] of .EFF v2.0.

savingThrow

0

As per offset [+0x40] of .EFF v2.0.

sourceID

-1

The object id of the effect’s source, as per CGameEffect.m_sourceId.

sourceTarget

-1

The object id of the source’s target, as per CGameEffect.m_sourceTarget;
you might need to set this if the opcode applies additional effects.

sourceX

-1

As per offset [+0x80] of .EFF v2.0.

sourceY

-1

As per offset [+0x84] of .EFF v2.0.

special

0

As per offset [+0x48] of .EFF v2.0.

spellLevel

0

As per offset [+0x18] of .EFF v2.0.

targetType

1

As per offset [+0x14] of .EFF v2.0.

targetX

-1

As per offset [+0x88] of .EFF v2.0.

targetY

-1

As per offset [+0x8C] of .EFF v2.0.

EEex_GameObject_CastUserType

Aliases: EEex_GameObject_CastUT

Summary

Takes the given object and returns a cast userdata that represents object’s true type.

Most EEex functions will call this function before passing an object to the modder API.

Parameters:

Name

Type

Default Value

Description

object

CGameObject

The object to cast.

Return Values:

Type

Description

 CGameAIArea   | CGameAIBase | CGameAIGame | CGameContainer | CGameDoor        | CGameFireball3d | CGameSound    | 
CGameSpawning | CGameSprite | CGameStatic | CGameTemporal | CGameTiledObject | CGameTrigger | CObjectMarker | nil

See summary.

EEex_GameObject_Get

Summary

Returns the object associated with objectID, or nil if objectID is invalid.

Parameters:

Name

Type

Default Value

Description

objectID

number

The id of the object to fetch.

Return Values:

Type

Description

 CGameAIArea   | CGameAIBase | CGameAIGame | CGameContainer | CGameDoor        | CGameFireball3d | CGameSound    | 
CGameSpawning | CGameSprite | CGameStatic | CGameTemporal | CGameTiledObject | CGameTrigger | CObjectMarker | nil

See summary.

EEex_GameObject_GetAllSelectedIDs

Warning

Deprecated: Use EEex_Sprite_GetAllSelectedIDs() instead.

EEex_GameObject_GetClass

Instance Name: getClass

Summary

Returns the given object’s class.

Parameters:

Name

Type

Default Value

Description

object

CGameObject

The object whose class is being fetched.

Return Values:

Type

Description

number

See summary.

EEex_GameObject_GetSelected

Warning

Deprecated: Use EEex_Sprite_GetSelected() instead.

EEex_GameObject_GetSelectedID

Warning

Deprecated: Use EEex_Sprite_GetSelectedID() instead.

EEex_GameObject_GetUnderCursor

Summary

Returns the interactable object currently under the cursor, or nil if none exists.

Return Values:

Type

Description

CGameContainer | CGameDoor | CGameSprite | CGameTrigger | nil

See summary.

EEex_GameObject_GetUnderCursorID

Summary

Returns the id of the interactable object currently under the cursor, or -1 if none exists.

Return Values:

Type

Description

number

See summary.

EEex_GameObject_IsSprite

Instance Name: isSprite

Summary

Returns whether the given object is a sprite.

Parameters:

Name

Type

Default Value

Description

object

CGameObject

The object to check.

allowDead

boolean

false

Determines whether object is allowed to be dead.

Return Values:

Type

Description

boolean

See summary.

EEex_GameObject_IsSpriteID

Summary

Returns whether the given objectID is associated with a sprite.

Parameters:

Name

Type

Default Value

Description

objectID

number

The object id to check.

allowDead

boolean

false

Determines whether the sprite associated with objectID is allowed to be dead.

Return Values:

Type

Description

boolean

See summary.

EEex_GameObject_IterateSelected

Warning

Deprecated: Use EEex_Sprite_IterateSelected() instead.

EEex_GameObject_IterateSelectedIDs

Warning

Deprecated: Use EEex_Sprite_IterateSelectedIDs() instead.