Log In  

Cart #snerf-1 | 2020-07-08 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA


So I'm obviously following the roguelike tutorial from LazyDevs, I'm on the combat section where we add a flash to indicate damage done by the player to the mobs and I'm using multicolored mobs, which is fine. But everything else that uses or shares the same color with the mob will also flash when the player deal damage to the mob, and one of the mobs doesn't seem to be drawn correctly as the others, as you can see in the cart I have little yellow dots to indicate space and how far apart something is and the mob in question is being drawn above the dots where as the others are being drawn underneath. The one that's drawn above is the only one that makes other things that share the same color as the mob flash when damaged. So idk what the hell is going on lol if anyone can explain or help me out with is I'd greatly appreciate it! Thanks!

P#79063 2020-07-08 17:02 ( Edited 2020-07-08 17:06)

1
function drawspr(_spr,_x,_y,_c,_flip)
    map()    <<< remove this line
    palt(0,false)
    spr(_spr,_x,_y,1,1,_flip)
    pal()
end

The problem is in the drawspr() function. You draw the map every time you draw a sprite.

P#79064 2020-07-08 19:31

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-04-18 12:34:23 | 0.018s | Q:13