Dawnoboo [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=73207 How would I launch my slime with the mouse? <p> <table><tr><td> <a href="/bbs/?pid=122970#p"> <img src="/bbs/thumbs/pico8_yoduzefuze-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=122970#p"> Slime test</a><br><br> by <a href="/bbs/?uid=73207"> Dawnoboo</a> <br><br><br> <a href="/bbs/?pid=122970#p"> [Click to Play]</a> </td></tr></table> <br /> I need help with how I want the player to move. I want the movement of the game to be mouse based, i.e I want the player to jump up left when moving cursor to the left of the slime and jump up right when mouse is to the right of the slime. How would I be able to achive this? I've tried to test something if it'll work, and it didn't.<br /> What I tried was<br /> if stat(34)==1 and (on_ground or jump&lt;2) and SX==8 and sy==8 and mouse.x&lt;x then<br /> on_ground=false<br /> jump+=1<br /> dy=dy-1<br /> sfx(0)<br /> end<br /> This doesn't work since whenever the X cord for the mouse is less then the slime X, or x, it still jumps. Is there something I'm not thinking of that could work?</p> https://www.lexaloffle.com/bbs/?tid=50810 https://www.lexaloffle.com/bbs/?tid=50810 Sun, 25 Dec 2022 00:21:44 UTC