← Previous | Next →
combat
Description
Engages the NPC in combat with a specified target.
| Name |
Type |
Possibilities |
| combat |
behaviour |
2 |
Parameters
| # |
Name |
Type |
Mandatory |
Description |
Multiple |
| 1 |
target |
Entity |
Yes |
The target that the NPC will engage in combat. |
No |
Outputs
| # |
Description |
| 1 |
The target is already dead. |
| 2 |
The NPC engages in combat with the target. |
Example
NPC
name Enemy
model g_m_y_ballaorig_01
position -1020.72 4839.78 258.30 0.0
interaction
nothing
behaviour
getClosestPlayer player 10
combat $player