Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
Pokey.inc.c
Go to the documentation of this file.
1#include "Pokey.h"
2
3API_CALLABLE(N(SetPokeyInstigatorValue)) {
4 script->owner1.enemy->instigatorValue = 3;
5 return ApiStatus_DONE2;
6}
7
8MobileAISettings N(AISettings_Pokey) = {
9 .moveSpeed = 1.8f,
10 .moveTime = 50,
11 .waitTime = 10,
12 .alertRadius = 250.0f,
13 .playerSearchInterval = 2,
14 .chaseSpeed = 3.5f,
15 .chaseTurnRate = 45,
16 .chaseUpdateInterval = 6,
17 .chaseRadius = 300.0f,
18 .unk_AI_2C = 1,
19};
20
21EvtScript N(EVS_NpcAI_Pokey) = {
22 Call(N(SetPokeyInstigatorValue))
23 Call(BasicAI_Main, Ref(N(AISettings_Pokey)))
24 Return
25 End
26};
27
28NpcSettings N(NpcSettings_Pokey) = {
29 .height = 72,
30 .radius = 15,
31 .level = ACTOR_LEVEL_POKEY,
32 .ai = &N(EVS_NpcAI_Pokey),
33 .onHit = &EnemyNpcHit,
34 .onDefeat = &EnemyNpcDefeat,
35};
Bytecode EvtScript[]
#define ApiStatus_DONE2
Definition evt.h:118
EvtScript EnemyNpcDefeat
Definition encounter.c:158
EvtScript EnemyNpcHit
Definition encounter.c:131
#define Ref(sym)
Address/pointer constant.
Definition macros.h:60
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217