If I understood your message correctly, you want a trainer to dissapear after the battle, correct?I would like to use the SPECIAL 0XF5 that allows you to battle by choosing three Pokémon, how could you put this code in the trainerbattle scrpit with setflag so it disappears after the battle?
#dynamic 0x800000
#org @start
trainerbattle 0x0 0x001 0x0 @before @after
hidesprite 0xTheTrainer'sPersonEventNumber // You can see an NPC's Person Event Number in Advance Map
setflag 0x200
release
end
#org @before
= Go, all my PIKACHUs!
#org @after
= Nooo! My PIKACHUs!!!!!
fadescreen 0x1
hidesprite 0xTheTrainer'sPersonEventNumber
fadescreen 0x0
So..? You can use it normally and add the hidesprite at some point afterwards.But I want to do this using the Special 0xF5 of the battle tower.
In principle, the adaptation of this script with the parameters of some commands should work. You don't need the checkflag, because with the setflag you are making the mini disappear, the script won't longer be repeated.Could you send me an example of the code that I made when I change the ex setflag: 0x200 then used 0x201 it does not accept the battle.
#dynamic 0x800000
#org @inicio
lock
faceplayer
msgbox @fala 0x6
if 0x1 goto @battle
release
end
#org @battle
special 0x27
special 0xF5
checkflag 0x222
trainerbattle 0x1 0x70 0x0 @before @defeat @after
release
end
#org @after
msgbox @beaten 0x6
special 0x28
setflag 0x222
fadescreen 0x1
hidesprite 2
fadescreen 0x0
release
end
#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.
#org @before
= [black_fr]Será que você escolheu bem?
#org @defeat
= Isso vai ter volta!
#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
#dynamic 0x800000
#org @inicio
lock
faceplayer
msgbox @fala 0x6
waitmsg
special 0x27
special 0xF5
waitstate
pause 0x25
trainerbattle 0x1 0x70 0x0 @before @defeat @after
#org @after
msgbox @beaten 0x6
special 0x28
fadescreen 0x1
hidesprite 0xA
fadescreen 0x0
release
end
#org @fala
= [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo.
#org @before
= [black_fr]Será que você escolheu bem?
#org @defeat
= Isso vai ter volta!
#org @beaten
= [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
There's only one problem with the special 0x28 that's supposed to back up my team, not when I lose the battle for the trainerbattle.In principle, the adaptation of this script with the parameters of some commands should work. You don't need the checkflag, because with the setflag you are making the mini disappear, the script won't longer be repeated.
Código:#dynamic 0x800000 #org @inicio lock faceplayer msgbox @fala 0x6 waitmsg special 0x27 special 0xF5 waitstate pause 0x25 trainerbattle 0x1 0x70 0x0 @before @defeat @after #org @after msgbox @beaten 0x6 special 0x28 fadescreen 0x1 hidesprite 0xA fadescreen 0x0 release end #org @fala = [black_fr]Dentro dessa TORRE FANTASMA a\nEQUIPE ROCKET faz as regras!\pEscolha três POKéMON para batalhar\ncomigo. #org @before = [black_fr]Será que você escolheu bem? #org @defeat = Isso vai ter volta! #org @beaten = [black_fr]Você ganhou.\nNa próxima vez eu irei ganhar!
Do you say use an applymovement "S" on the floor? I'm having a problem with backing up the team with the special 0x28 when I lose the battle for the trainerbattle I'm only with the three POKÉMON how could I make the team come back even losing the battle?Oh! I just wanna add one little thing, probably the "I See you" thing of the trainer wont work with this script, you should add some Scripts in the floor that trigger the movement and the script itself
If I'm not mistaken the only way to try to do something like this is to use the trainerbattle 0x9, it's the one that appears in Oak's lab when you fight against the rival, even if you lose the script continues, but you'll have to edit it to remove the dialogue and I think that if you use more than one Pokémon appear bugs. (It doesn't take you to the Pokemon Center).There's only one problem with the special 0x28 that's supposed to back up my team, not when I lose the battle for the trainerbattle.
How do I activate the special 0x28 even losing the battle.
Do you say use an applymovement "S" on the floor? I'm having a problem with backing up the team with the special 0x28 when I lose the battle for the trainerbattle I'm only with the three POKÉMON how could I make the team come back even losing the battle?
That happens because the routine of said special is done for that to happen, to change it you must modify the routine of that special. This can help you find it:Now I'm having a new problem any pokémon above level 51 appears NOT ABLE to battle
ROM:080E72B8 @ =============== S U B R O U T I N E =======================================
ROM:080E72B8
ROM:080E72B8
ROM:080E72B8 sub_80E72B8:
ROM:080E72B8 PUSH {R4-R7,LR}
ROM:080E72BA LDR R0, =dword_300500C
ROM:080E72BC LDR R0, [R0]
ROM:080E72BE LDR R1, =0x55C
ROM:080E72C0 ADDS R0, R0, R1
ROM:080E72C2 LDRB R0, [R0]
ROM:080E72C4 LSLS R0, R0, #0x1F
ROM:080E72C6 LSRS R0, R0, #0x1F
ROM:080E72C8 MOVS R1, R0
ROM:080E72CA MOVS R7, #0x44
ROM:080E72CC CMP R1, #0
ROM:080E72CE BEQ loc_80E72D2
ROM:080E72D0 MOVS R7, #0x45
ROM:080E72D2
ROM:080E72D2 loc_80E72D2: @ CODE XREF: sub_80E72B8+16j
ROM:080E72D2 LDR R4, =word_20370D0
ROM:080E72D4 MOVS R0, #0
ROM:080E72D6 STRH R0, [R4]
ROM:080E72D8 MOVS R0, R1
ROM:080E72DA BL sub_80E7188
ROM:080E72DE LSLS R0, R0, #0x10
ROM:080E72E0 LSRS R0, R0, #0x10
ROM:080E72E2 CMP R0, #0x37
ROM:080E72E4 BLS loc_80E7320
ROM:080E72E6 MOVS R5, #0
ROM:080E72E8 ADDS R6, R4, #0
ROM:080E72EA
ROM:080E72EA loc_80E72EA: @ CODE XREF: sub_80E72B8+66j
ROM:080E72EA LDR R0, =dword_300500C
ROM:080E72EC LDR R0, [R0]
ROM:080E72EE LDR R1, =0x56D
ROM:080E72F0 ADDS R0, R0, R1
ROM:080E72F2 ADDS R0, R0, R5
ROM:080E72F4 LDRB R0, [R0]
ROM:080E72F6 SUBS R0, #1
ROM:080E72F8 MOVS R1, #0x64
ROM:080E72FA MULS R1, R0
ROM:080E72FC LDR R0, =unk_2024284
ROM:080E72FE ADDS R4, R1, R0
ROM:080E7300 MOVS R0, R4
ROM:080E7302 MOVS R1, R7
ROM:080E7304 BL sub_803FBE8
ROM:080E7308 CMP R0, #0
ROM:080E730A BNE loc_80E731A
ROM:080E730C MOVS R0, #1
ROM:080E730E STRH R0, [R6]
ROM:080E7310 MOVS R0, R4
ROM:080E7312 MOVS R1, R7
ROM:080E7314 MOVS R2, R6
ROM:080E7316 BL sub_804037C
ROM:080E731A
ROM:080E731A loc_80E731A: @ CODE XREF: sub_80E72B8+52j
ROM:080E731A ADDS R5, #1
ROM:080E731C CMP R5, #2
ROM:080E731E BLE loc_80E72EA
ROM:080E7320
ROM:080E7320 loc_80E7320: @ CODE XREF: sub_80E72B8+2Cj
ROM:080E7320 LDR R0, =word_20370D0
ROM:080E7322 LDRH R0, [R0]
ROM:080E7324 CMP R0, #0
ROM:080E7326 BEQ loc_80E732E
ROM:080E7328 MOVS R0, #0x2A
ROM:080E732A BL sub_8054E90
ROM:080E732E
ROM:080E732E loc_80E732E: @ CODE XREF: sub_80E72B8+6Ej
ROM:080E732E POP {R4-R7}
ROM:080E7330 POP {R0}
ROM:080E7332 BX R0
ROM:080E7332 @ End of function sub_80E72B8
ROM:080E7332
ROM:080E7332 @ ---------------------------------------------------------------------------
ROM:080E7334 off_80E7334: .long dword_300500C @ DATA XREF: sub_80E72B8+2r
ROM:080E7334 @ sub_80E72B8:loc_80E72EAr
ROM:080E7338 dword_80E7338: .long 0x55C @ DATA XREF: sub_80E72B8+6r
ROM:080E733C off_80E733C: .long word_20370D0 @ DATA XREF: sub_80E72B8:loc_80E72D2r
ROM:080E733C @ sub_80E72B8:loc_80E7320r
ROM:080E7340 dword_80E7340: .long 0x56D @ DATA XREF: sub_80E72B8+36r
ROM:080E7344 off_80E7344: .long unk_2024284 @ DATA XREF: sub_80E72B8+44r
compare LASTRESULT 0x0
if 0x1 goto @end
...
...
#org @end
release
end