6 Enemy* enemy = script->owner1.enemy;
8 f32 posX, posY, posZ, posW;
17 npc->
yaw =
atan2(posX, posZ, temp_f22, temp_f20);
26 posW = posY - npc->
pos.
y;
29 }
else if (posW < -2.0) {
37 script->functionTemp[0] = 2;
42 Enemy* enemy = script->owner1.enemy;
47 script->functionTemp[1]--;
48 if (script->functionTemp[1] >= 0) {
50 npc->
duration = aiSettings->waitTime / 2 +
rand_int(aiSettings->waitTime / 2 + 1);
52 script->functionTemp[0] = 4;
58API_CALLABLE(N(BooPatrolAI_Main)) {
59 Enemy* enemy = script->owner1.enemy;
76 script->functionTemp[0] = 0;
78 npc->
flags &= ~NPC_FLAG_JUMPING;
81 switch (script->functionTemp[0]) {
96 enemy->varTable[0] = npc->
pos.
y;
104 .alertRadius = 50.0f,
105 .alertOffsetDist = 50.0f,
106 .playerSearchInterval = 10,
107 .chaseRadius = 100.0f,
108 .chaseOffsetDist = 80.0f,
113 Call(N(BooPatrolAI_Main),
Ref(N(AISettings_Boo_Patrol)))
121 .level = ACTOR_LEVEL_NONE,
122 .ai = &N(EVS_NpcAI_Boo_Patrol),
void N BooPatrolAI_Loiter(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
void N BooPatrolAI_Move(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
void N PatrolAI_MoveInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
void N PatrolAI_PostLoiter(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
#define npc_raycast_down_sides
s32 evt_get_variable(Evt *script, Bytecode var)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
void PatrolAI_LoiterInit(Evt *script, MobileAISettings *aiSettings, EnemyDetectVolume *territory)
enum TerritoryShape shape
Npc * get_npc_unsafe(s32 npcID)
EnemyTerritoryPatrol patrol
void npc_move_heading(Npc *npc, f32 speed, f32 yaw)
s32 skipPlayerDetectChance
enum TerritoryShape detectShape
EnemyTerritory * territory
#define Ref(sym)
Address/pointer constant.
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
#define Return
Kills the current EVT thread.