- 8
- Posts
- 2
- Years
- Seen Dec 20, 2023
Hello,
I've run into a scripting problem while using pokeemerald. I'm trying to pan the camera during a cutscene/script, but when I build the game, nothing happens. The rest of the Explosion script goes off, but the camera stays in place. Does the problem lie with the code, or something else?
I've run into a scripting problem while using pokeemerald. I'm trying to pan the camera during a cutscene/script, but when I build the game, nothing happens. The rest of the Explosion script goes off, but the camera stays in place. Does the problem lie with the code, or something else?
Code:
mapscripts PewterMine_MapScripts {
map_script MAP_SCRIPT_ON_TRANSITION: PewterMine_OnTransition
}
script PewterMine_OnTransition{
end
}
script PewterMine_JoinAmy{
lock
if(var(VAR_STORY_PROGRESS)<14){
msgbox(format("Ugh... I'll show you! You grunts have nothing on us!"))
faceplayer
msgbox(format("Hey, you! Help me beat this guy!"),MSGBOX_YESNO)
if(var(VAR_RESULT)==1){
multi_fixed_2_vs_1(TRAINER_GRUNT_AQUA_HIDEOUT_2,format("How..."),TRAINER_GRUNT_AQUA_HIDEOUT_1,3)
specialvar(VAR_RESULT, GetBattleOutcome)
if(var(VAR_RESULT)==B_OUTCOME_WON){
setvar(VAR_STORY_PROGRESS,14)
delay(10)
goto(PewterMine_Explosion)
}
else{
special(SetCB2WhiteOut)
}
}
}
release
end
}
script PewterMine_JoinCaleb{
lock
if(var(VAR_STORY_PROGRESS)<14){
msgbox(format("You people have no right to be here! Here, or anywhere in Kanto!"))
faceplayer
msgbox(format("Hey! Help me chase this grunt away!"),MSGBOX_YESNO)
if(var(VAR_RESULT)==1){
multi_fixed_2_vs_1(TRAINER_GRUNT_AQUA_HIDEOUT_3,format("No!"),TRAINER_SAWYER_1,2)
specialvar(VAR_RESULT, GetBattleOutcome)
if(var(VAR_RESULT)==B_OUTCOME_WON){
setvar(VAR_STORY_PROGRESS,14)
delay(10)
goto(PewterMine_Explosion)
}
else{
special(SetCB2WhiteOut)
}
}
}
release
end
}
script PewterMine_Magma6Dia{
lock
msgbox(format("Zubat! Clear out the enemy!"))
release
end
}
script PewterMine_Aqua7Dia{
lock
msgbox(format("Ack... What are you people doing on our turf?"))
release
end
}
script PewterMine_Magma9Dia{
}
script PewterMine_Magma10Dia{
}
script PewterMine_Explosion{
lock
delay(5)
applymovement(OBJ_EVENT_ID_CAMERA,PewterMine_CameraExplosion)
waitmovement(0)
applymovement(8,PewterMine_Aqua8Jump)
msgbox(format("It's a bomb!"))
applymovement(4,PewterMine_Exclam)
msgbox(format("Hold da kaeft!"))
msgbox("Run!")
applymovement(8,PewterMine_Aqua8Run)
applymovement(4,PewterMine_SorenRun)
applymovement(6,PewterMine_Aqua7Run)
applymovement(7,PewterMine_Aqua7Run)
applymovement(9,PewterMine_Magma9Run)
applymovement(3,PewterMine_Aqua3Run)
applymovement(5,PewterMine_Aqua3Run)
waitmovement(0)
fadescreen(1)
special(ShakeCamera)
setflag(FLAG_PEWTER_MINE_DONE)
applymovement(OBJ_EVENT_CAMERA,PewterMine_CameraBack)
waitmovement(0)
fadescreen(0)
release
end
}
movement PewterMine_Aqua7Run{
walk_diag_northeast
walk_fast_right*11
step_end
}
movement PewterMine_Magma9Run{
walk_fast_down*3
walk_fast_right*10
step_end
}
movement PewterMine_Aqua3Run{
walk_fast_up*3
walk_fast_right
walk_diag_northeast
walk_fast_right*11
step_end
}
movement PewterMine_Aqua8Run{
walk_fast_right*2
walk_diag_northeast
walk_fast_right*4
walk_diag_northeast
walk_fast_right*10
step_end
}
movement PewterMine_Aqua8Jump{
emote_exclamation_mark
delay_16
jump_in_place_right
jump_in_place_right
}
movement PewterMine_SorenRun{
walk_fast_down*3
walk_fast_right*2
walk_diag_northeast
walk_fast_right*4
walk_diag_northeast
walk_fast_right*9
step_end
}
movement PewterMine_Aqua11Run{
walk_fast_up*2
walk_fast_right*2
walk_diag_northeast
walk_fast_right*4
walk_diag_northeast
walk_fast_right*9
step_end
}
movement PewterMine_Exclam{
emote_exclamation_mark
}
movement PewterMine_CameraExplosion{
walk_fast_down*7
walk_fast_left*5
step_end
}
movement PewterMine_CameraBack{
walk_fast_right*5
walk_fast_up*7
step_end
}