You are not logged in.
Pages: 1
I have problems adding new objects in a map which hadn't before.
I 've been looking for coincidences in scripts, mapheaders and MapObjects and this is what i changed:
Scripts:
UndergroundPathNSScript: ; 459ab (11:59ab)
jp EnableAutoTextBoxDrawing
UndergroundPathNSTextPointers: ; 459ae (11:59ae)
dw Predef5CText
dw Predef5CText
Mapheaders:
UndergroundPathNS_h: ; 0x61f1a to 0x61f26 (12 bytes) (id=119)
db CAVERN
db UNDERGROUND_PATH_NS_HEIGHT, UNDERGROUND_PATH_NS_WIDTH
dw UndergroundPathNSBlocks, UndergroundPathNSTextPointers, UndergroundPathNSScript
db 0
dw UndergroundPathNSObject
Mapobjects:
db $2 ; people
db SPRITE_BALL, $3 + 4, $3 + 4, $ff, $ff, ITEM | $1, ANTIDOTE
db SPRITE_BALL, $2 + 4, $2 + 4, $ff, $ff, ITEM | $2, POTION
The compilation runs, but in game, when i try to pick up the new item, the game shows me this:
all in white and dont pick up the item...
What else do I need to do?
Offline
You need to add new items as "hide/show" objects. You do this by adding a constant for the new item in constants/hide_show_constants.asm and by adding the entry to data/hide_show_data.asm, which associates the hide/show constant ID with the sprite ID of the object on the map.
Note that the order of hide/show objects in data/hide_show_data.asm must match the order of the constant IDs.
This should fix both of your errors.
The sprite isn't disappearing of course because it isn't a hide/show object.
And the text doesn't appear/the item doesn't end up in your bag because the PickUpItem routine aborts if no matching hide/show object was found with the corresponding sprite ID with the sprite you interacted with.
Offline
You need to add new items as "hide/show" objects. You do this by adding a constant for the new item in constants/hide_show_constants.asm and by adding the entry to data/hide_show_data.asm, which associates the hide/show constant ID with the sprite ID of the object on the map.
Note that the order of hide/show objects in data/hide_show_data.asm must match the order of the constant IDs.This should fix both of your errors.
The sprite isn't disappearing of course because it isn't a hide/show object.
And the text doesn't appear/the item doesn't end up in your bag because the PickUpItem routine aborts if no matching hide/show object was found with the corresponding sprite ID with the sprite you interacted with.
YES!!! I did it!
Very good explanation :D
THANK YOU!!!
Offline
Pages: 1