eq2emu/docs/lua_functions/AddControlEffect.md

22 lines
689 B
Markdown
Raw Permalink Normal View History

### Function: AddControlEffect(Spawn, Type, OnlyAddSpawn)
2025-05-04 14:34:15 -04:00
**Description:**
Apply a Control Effect to a Spawn, this includes Mesmerize, Stun, Root, so on.
2025-05-04 14:34:15 -04:00
**Parameters:**
- `Spawn`: Spawn - The spawn or entity involved.
- `Type`: UInt8 - Control Effect Type
- `OnlyAddSpawn`: Boolean (Optional) - False by default, set to True will only apply Control Effect to Spawn. Otherwise if Spell all Spawn Targets will apply control effect.
2025-05-04 14:34:15 -04:00
**Returns:** None.
**Notes:**
- See CONTROL_EFFECT_TYPE defines for more details.
2025-05-04 14:34:15 -04:00
**Example:**
```lua
-- Example usage: Will apply Control Effect to Spawn, or if in a Spell Script all Spell Targets, Type 1 is Mesmerize.
AddControlEffect(Spawn, 1)
2025-05-04 14:34:15 -04:00
```