Log In  

Cart #yomgokwi-0 | 2020-07-25 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

Hi, I'm having a bit of trouble with the lilly pad. I want to make it so that when the player is on the lilly pad, the game doesn't end. I've had a go, but I just made it so that all of the water is not longer a lose tile. I've considered making the lilly pad tile replace the next tile it moves to, but that seems like a lot of effort. Do I need to make individual tiles for each river tile?

Thanks,
Moon

P#79895 2020-07-25 04:50 ( Edited 2020-07-25 07:06)

why not simply make the lilly pad a sprite?
In code, before checking for river tiles, check if player is on lilly.
if yes, skip river tile check.

P#79902 2020-07-25 05:55

I'm not sure why your code is checking for a lilly tile if the lilly is kept track of separately. Shouldn't it be checking if the player and the lilly are in the same spot?

(not is_tile(lilly,p.x,p.y)) seems like it should instead say (not (p.x==l.x and p.y==l.y))

P#79903 2020-07-25 05:58

Ahhh that helps, I've gotten rid of the safe water function, and changed that. However now, the water doesn't cause a game over. Is that because p.y==l.y when it's on the water?

P#79905 2020-07-25 07:03

I've made it skip the check on the river tile if it's a lilly tile too, and that worked. Thank you both!

P#79906 2020-07-25 07:05

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 09:49:34 | 0.009s | Q:17