| scopez (19) | |||
|
ok in this code im not understanding where to place where the water should = false to stop the water from going and its just a disaster im trying to make it where you drop water and it spreads both directions when it hits the floor i guess i got overwhelmed and lost track of things im really confused if anyone can help me fix this and make it work thank you
| |||
|
|
|||
| samrux (132) | |
| Nice key defining idea, I'll use it in my game ;D | |
|
Last edited on
|
|
| soranz (478) | |||
OK let me get this straight. U have a bounded region from (0, 0) to (24, 24) or so. U have a 'character' point which starts at the top left corner (1, 1). It's able to go down and up but when it goes left or right u want a 'water' drop to be simulated graphically true ? while(water) clearly hangs because once it reaches the left boundary of x the loop doesn't resolve the collision. I'm guessing that it'd be ideal if the drop spreads left and right at (about) the same time right ?Ok this is what u can do:
Also, put those global vars in better places... | |||
|
Last edited on
|
|||
| scopez (19) | |
|
wait i realized i forgot to put a break after KEY_RIGHT thats why it ran the water when i pressed right.. if you look it was supposed to happen when you pressed w but i left out a break | |
|
Last edited on
|
|
| soranz (478) | |
| ahhh yah i noticed that but focused on fixin that water function ;) | |
|
|
|