You are not logged in.
Pages: 1
So ive created a script which replaces a tile on the map if a certain flag is met. It is called at the very beginning of the map script. However, when said tile is on screen the game horrifically slows down. Any ideas why?
PokemonTower7Script: ; 60d05 (18:4d05)
call BlockTings
call EnableAutoTextBoxDrawing
ld hl, PokemonTower7TrainerHeaders
ld de, PokemonTower7ScriptPointers
ld a, [W_POKEMONTOWER7CURSCRIPT]
call ExecuteCurMapScriptInTable
ld [W_POKEMONTOWER7CURSCRIPT], a
ret
BlockTings:
ld a, [W_SAVEDKREWELLA] ; load new flag
bit 0, a
jr nz, .end
ret
.end
ld a, $2
ld [wNewTileBlockID], a
ld c, $6
ld b, $1
predef ReplaceTileBlock
ret
PokemonTower7ScriptPointers:
dw CheckFightingMapTrainers
dw DisplayEnemyTrainerTextAndStartBattle
dw EndTrainerBattle
dw PokemonTower7Script3
dw PokemonTower7Script4
Offline
Because the ASM scripts are regularly evaluated in RBGY. So you redraw the map over and over again. Do it once, use a flag that resets on map change.
cYa,
Tauwasser
Offline
Pages: 1