Finish adding local IDs to map.json files
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
.set LOCALID_PLAYER, 1
|
||||
.set LOCALID_OPPONENT, 2
|
||||
.set LOCALID_ATTENDANT, 3
|
||||
|
||||
@ On this map the player will automatically walk into the room, but the camera is supposed to remain still.
|
||||
@ To do this GF sets the player (OBJ_EVENT_ID_PLAYER) invisible and creates a fake player object (LOCALID_VERDANTURF_TENT_BATTLE_PLAYER).
|
||||
@ The graphics of this fake player object are represented with VAR_OBJ_GFX_ID_1.
|
||||
@ The graphics of the opponent are represented with VAR_OBJ_GFX_ID_0, which will ultimately be set by tower_setopponent.
|
||||
VerdanturfTown_BattleTentBattleRoom_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, VerdanturfTown_BattleTentBattleRoom_OnTransition
|
||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, VerdanturfTown_BattleTentBattleRoom_OnFrame
|
||||
map_script MAP_SCRIPT_ON_WARP_INTO_MAP_TABLE, VerdanturfTown_BattleTentBattleRoom_OnWarp
|
||||
.byte 0
|
||||
|
||||
@ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden
|
||||
@ The player is represented instead by object event 1, which has the gfx id VAR_OBJ_GFX_ID_1
|
||||
@ The opponent is represented by object event 2, which has the gfx id VAR_OBJ_GFX_ID_0
|
||||
|
||||
VerdanturfTown_BattleTentBattleRoom_OnTransition:
|
||||
call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx
|
||||
end
|
||||
@@ -37,15 +33,15 @@ VerdanturfTown_BattleTentBattleRoom_OnFrame:
|
||||
.2byte 0
|
||||
|
||||
VerdanturfTown_BattleTentBattleRoom_EventScript_EnterRoom::
|
||||
showobjectat LOCALID_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
||||
applymovement LOCALID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter
|
||||
showobjectat LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_PlayerEnter
|
||||
waitmovement 0
|
||||
frontier_get FRONTIER_DATA_BATTLE_NUM
|
||||
goto_if_ne VAR_RESULT, 0, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
||||
VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter::
|
||||
tower_setopponent
|
||||
addobject LOCALID_OPPONENT
|
||||
applymovement LOCALID_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter
|
||||
addobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentEnter
|
||||
waitmovement 0
|
||||
battletent_getopponentintro
|
||||
msgbox gStringVar4, MSGBOX_DEFAULT
|
||||
@@ -65,11 +61,11 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_DefeatedOpponent::
|
||||
frontier_set FRONTIER_DATA_BATTLE_NUM, VAR_RESULT
|
||||
switch VAR_RESULT
|
||||
case 3, VerdanturfTown_BattleTentBattleRoom_EventScript_WarpToLobbyWon
|
||||
applymovement LOCALID_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT, VerdanturfTown_BattleTentBattleRoom_Movement_OpponentExit
|
||||
waitmovement 0
|
||||
removeobject LOCALID_OPPONENT
|
||||
applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterDown
|
||||
applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterUp
|
||||
removeobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterDown
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterUp
|
||||
waitmovement 0
|
||||
msgbox BattleFrontier_BattlePalaceBattleRoom_Text_LetMeRestoreYourMons, MSGBOX_DEFAULT
|
||||
special LoadPlayerParty
|
||||
@@ -106,8 +102,8 @@ VerdanturfTown_BattleTentBattleRoom_EventScript_AskRetireChallenge::
|
||||
case MULTI_B_PRESSED, VerdanturfTown_BattleTentBattleRoom_EventScript_AskContinueChallenge
|
||||
|
||||
VerdanturfTown_BattleTentBattleRoom_EventScript_ContinueChallenge::
|
||||
applymovement LOCALID_ATTENDANT, Common_Movement_WalkInPlaceFasterRight
|
||||
applymovement LOCALID_PLAYER, Common_Movement_WalkInPlaceFasterRight
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_ATTENDANT, Common_Movement_WalkInPlaceFasterRight
|
||||
applymovement LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, Common_Movement_WalkInPlaceFasterRight
|
||||
waitmovement 0
|
||||
closemessage
|
||||
goto VerdanturfTown_BattleTentBattleRoom_EventScript_NextOpponentEnter
|
||||
@@ -133,11 +129,11 @@ VerdanturfTown_BattleTentBattleRoom_OnWarp:
|
||||
.2byte 0
|
||||
|
||||
VerdanturfTown_BattleTentBattleRoom_EventScript_SetUpObjects::
|
||||
hideobjectat LOCALID_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
||||
hideobjectat LOCALID_VERDANTURF_TENT_BATTLE_PLAYER, MAP_VERDANTURF_TOWN_BATTLE_TENT_BATTLE_ROOM
|
||||
call VerdanturfTown_BattleTentBattleRoom_EventScript_SetPlayerGfx
|
||||
setvar VAR_TEMP_1, 1
|
||||
applymovement OBJ_EVENT_ID_PLAYER, VerdanturfTown_BattleTentBattleRoom_Movement_SetInvisible
|
||||
removeobject LOCALID_OPPONENT
|
||||
removeobject LOCALID_VERDANTURF_TENT_BATTLE_OPPONENT
|
||||
end
|
||||
|
||||
VerdanturfTown_BattleTentBattleRoom_EventScript_ReadyFor2ndOpponent::
|
||||
|
||||
Reference in New Issue
Block a user