Advertiser Content

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 1 Day Ago
Posted 1 Day Ago
1,286 posts
11.4 Years
In my script, there are 2 person events involved. One is a boulder, one is an NPC, and the NPC jumps over the boulder in the script. While they do so, the boulder appears to be on top of their sprite in the parts that overlap rather than their sprite being on top of the boulder. What determines which person event appears on top of the other during an overlap like this? I tried switching their events around to see if its a priority related to the event number, but nothing changed from that.
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

Anthroyd

Age 21
Male
United States
Seen 2 Days Ago
Posted 2 Days Ago
189 posts
3.4 Years
Which direction does your NPC "jump?" I believe the draw order depends on the sprite's y position on the screen. If your NPC is jumping "downward" then it'll appear "behind" the boulder until it reaches the midpoint of the boulder's sprite, then your NPC will be drawn "in front of" the boulder. If you jump from left to right or from right to left, your sprite will appear above the boulder always. If you jump from bottom to top, your sprite will appear above the boulder during the first half of the jump, then clip behind the boulder during the second half.
Pokémon Generation III ROM Hacking
Video Series

Pokémon Dreary

Discord

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 1 Day Ago
Posted 1 Day Ago
1,286 posts
11.4 Years
Which direction does your NPC "jump?" I believe the draw order depends on the sprite's y position on the screen. If your NPC is jumping "downward" then it'll appear "behind" the boulder until it reaches the midpoint of the boulder's sprite, then your NPC will be drawn "in front of" the boulder. If you jump from left to right or from right to left, your sprite will appear above the boulder always. If you jump from bottom to top, your sprite will appear above the boulder during the first half of the jump, then clip behind the boulder during the second half.
Interesting. The NPC is jumping from right to left, but appears behind the boulder. Could it maybe act differently when its an NPC instead of a player, or jumping because of an applymovenent command? Well if its due to the Y position, how can I go about manipulating that?
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

Anthroyd

Age 21
Male
United States
Seen 2 Days Ago
Posted 2 Days Ago
189 posts
3.4 Years
Interesting. The NPC is jumping from right to left, but appears behind the boulder. Could it maybe act differently when its an NPC instead of a player, or jumping because of an applymovenent command? Well if its due to the Y position, how can I go about manipulating that?
Hmm... try changing the movement to just walking from right to left. Does the NPC switch to being drawn in front of the boulder? If so, then it certainly is based off of the y position of the sprite, because the jumping animation moves the y position upwards, above the boulders, resulting in that drawing order. If you change it from just walking right to left and the boulder is still drawn in front, then I'm probably wrong about the whole y position thing.
Pokémon Generation III ROM Hacking
Video Series

Pokémon Dreary

Discord

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 1 Day Ago
Posted 1 Day Ago
1,286 posts
11.4 Years
Hmm... try changing the movement to just walking from right to left. Does the NPC switch to being drawn in front of the boulder? If so, then it certainly is based off of the y position of the sprite, because the jumping animation moves the y position upwards, above the boulders, resulting in that drawing order. If you change it from just walking right to left and the boulder is still drawn in front, then I'm probably wrong about the whole y position thing.
Yep, even walking they're still behind the boulder. I've tried every jump direction to no avail. It seems like the only time their sprite is in front is when standing directly underneath so the head is shown over the boulder. But all other movement seems to put them behind it.
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3

U.Flame

Humbled Beginner

Age 24
Male
Sapphire City
Seen 1 Day Ago
Posted 1 Day Ago
1,286 posts
11.4 Years
I found a workaround, but I hesitate to call this solved since the base question of "what determines which sprite is shown on top of another" remains unanswered.

For my script, I made a duplicate tile that looks like a boulder, and swapped them around with setmaptile and movesprite commands. It works just like how I wanted it so that's good enough for me at least.
Hacks I'm working on:
(Name in Progress) My main project, actively in development
Tales of Link GBA Remake: Secondary project, developing whenever I'm able.
3rd Gen Multiplayer Project: Research and development, really just experimenting for the moment
Pokemon Cursed/Creepy White: Group project, on hiatus for now with plans to return eventually.
Animal Crossing Wild World playing as an animal: experimental, messing with models and textures

Hacks I've worked on in the past:
Pokemon Ruby Destiny Broken Timeline (pre-reboot) - Assisted with maps
Pokemon HeartGold Prince Boo Edition - Experimental project with three small changes. Made at the request of YouTube LPer PrinceBoo21.

Recently came to realize I know significantly less than I thought I did. Basically, years of self-taught experience amounted to very little. After seeking tutorials and help, I've become more competent, but I have a long way to go. I look forward to learning more, in the meantime, I'll call myself a beginner, not a veteran.

Times I've been ninja'd: 18
Times I've ninja'd people: 3
Advertiser Content