Finish adding local IDs to map.json files
This commit is contained in:
@@ -28,6 +28,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"local_id": "LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT",
|
||||
"graphics_id": "OBJ_EVENT_GFX_VAR_0",
|
||||
"x": 5,
|
||||
"y": 1,
|
||||
@@ -41,6 +42,7 @@
|
||||
"flag": "0"
|
||||
},
|
||||
{
|
||||
"local_id": "LOCALID_SLATEPORT_TENT_BATTLE_PLAYER",
|
||||
"graphics_id": "OBJ_EVENT_GFX_VAR_1",
|
||||
"x": 4,
|
||||
"y": 8,
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
.set LOCALID_OPPONENT, 2
|
||||
.set LOCALID_PLAYER, 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_SLATEPORT_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 factory_setopponentgfx.
|
||||
|
||||
SlateportCity_BattleTentBattleRoom_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_TRANSITION, SlateportCity_BattleTentBattleRoom_OnTransition
|
||||
@@ -7,9 +9,6 @@ SlateportCity_BattleTentBattleRoom_MapScripts::
|
||||
map_script MAP_SCRIPT_ON_FRAME_TABLE, SlateportCity_BattleTentBattleRoom_OnFrame
|
||||
.byte 0
|
||||
|
||||
@ On this map the player (OBJ_EVENT_ID_PLAYER) is hidden
|
||||
@ The player is represented instead by LOCALID_PLAYER, which has the gfx id VAR_OBJ_GFX_ID_1
|
||||
|
||||
SlateportCity_BattleTentBattleRoom_OnTransition:
|
||||
call SlateportCity_BattleTentBattleRoom_EventScript_SetPlayerGfx
|
||||
end
|
||||
@@ -35,7 +34,7 @@ SlateportCity_BattleTentBattleRoom_OnWarp:
|
||||
SlateportCity_BattleTentBattleRoom_EventScript_SetUpObjects::
|
||||
setvar VAR_TEMP_1, 1
|
||||
hideobjectat OBJ_EVENT_ID_PLAYER, MAP_FALLARBOR_TOWN_BATTLE_TENT_BATTLE_ROOM
|
||||
hideobjectat LOCALID_OPPONENT, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM
|
||||
hideobjectat LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, MAP_SLATEPORT_CITY_BATTLE_TENT_BATTLE_ROOM
|
||||
end
|
||||
|
||||
SlateportCity_BattleTentBattleRoom_OnFrame:
|
||||
@@ -43,13 +42,13 @@ SlateportCity_BattleTentBattleRoom_OnFrame:
|
||||
.2byte 0
|
||||
|
||||
SlateportCity_BattleTentBattleRoom_EventScript_EnterRoom::
|
||||
applymovement LOCALID_PLAYER, SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter
|
||||
applymovement LOCALID_SLATEPORT_TENT_BATTLE_PLAYER, SlateportCity_BattleTentBattleRoom_Movement_PlayerEnter
|
||||
waitmovement 0
|
||||
factory_setopponentgfx
|
||||
setobjectxyperm LOCALID_OPPONENT, 5, 1
|
||||
removeobject LOCALID_OPPONENT
|
||||
addobject LOCALID_OPPONENT
|
||||
applymovement LOCALID_OPPONENT, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter
|
||||
setobjectxyperm LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, 5, 1
|
||||
removeobject LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT
|
||||
addobject LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT
|
||||
applymovement LOCALID_SLATEPORT_TENT_BATTLE_OPPONENT, SlateportCity_BattleTentBattleRoom_Movement_OpponentEnter
|
||||
waitmovement 0
|
||||
battletent_getopponentintro
|
||||
lockall
|
||||
|
||||
Reference in New Issue
Block a user