target selectors - magemonkeystudio/divinity GitHub Wiki
🎯 Target Selectors
Target selectors define which entities the action or condition will apply to. They are declared using bracketed types like [RADIUS]
or [SELF]
.
🎯 Built-In Selectors
Selector | Description |
---|---|
[SELF] |
Selects the player or entity that triggered the action |
[RADIUS] |
Selects nearby entities within a given distance |
[FROM_SIGHT] |
Selects the first entity in line of sight |
📐 Example
target-selectors:
near:
- '[RADIUS] ~distance: 5; ~attackable: true; ~party-member: false;'
self:
- '[SELF]'
This example defines two groups of targets: all attackable entities nearby, and the player themselves.
🛠 Tips
- Use
~distance:
to limit[RADIUS]
range. - Use
~attackable: true
to filter enemies only. [FROM_SIGHT]
simulates a "raycast" to detect what the player is looking at.