Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
please_come_back.c
Go to the documentation of this file.
1#include "common.h"
2#include "script_api/battle.h"
3#include "sprite/player.h"
4
5#define NAMESPACE battle_item_please_come_back
6
9
10EvtScript N(EVS_UseItem) = {
11 SetConst(LVarA, ITEM_PLEASE_COME_BACK)
12 ExecWait(N(UseItemWithEffect))
13 Call(SetGoalToHome, ACTOR_PLAYER)
14 Call(SetJumpAnimations, ACTOR_PLAYER, 0, ANIM_Mario1_Jump, ANIM_Mario1_Fall, ANIM_Mario1_Land)
15 Call(SetActorSpeed, ACTOR_PLAYER, Float(4.0))
16 Call(SetActorJumpGravity, ACTOR_PLAYER, Float(1.8))
17 Call(PlayerHopToGoal, 4, 0, 0)
18 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_MarioW2_PleaseComeBack)
19 Wait(8)
20 Call(SetAnimation, ACTOR_PLAYER, 0, ANIM_Mario1_Idle)
21 Return
22 End
23};
Bytecode EvtScript[]
@ ACTOR_PLAYER
Definition enums.h:2085
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Float(DOUBLE)
Definition macros.h:51
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define SetConst(VAR, CONST)
Sets the given variable to a given value, skipping the evt_get_variable call.
Definition macros.h:370
#define Return
Kills the current EVT thread.
Definition macros.h:217