E
EnSea
Guest
hello!
Sorry if this sounds demanding but I can't seem to figure out how to write a basic few lines of code to make an enemy bounce back when either hit or bumped into, like you would see in games like The Binding Of Isaac!
I want the code to be basic enough that I can add in some extra little details to the bounce, like maybe it'll grow a little bit then resize back down. I'm also wanting it be something that, instead of just writing this code every time I want something to bounce back, I can just have this code in a script and put the script in a little piece of code to use it.
For reference:
This is an RPG game where the sprites can only move 4 directions, like TBOI.
Also, as a side note, I'm not very experienced at this AND I'm still in highschool.
Thank you for reading this!
hopefully someone is kind enough to help me, as I know most of this community is ^-^
Sorry if this sounds demanding but I can't seem to figure out how to write a basic few lines of code to make an enemy bounce back when either hit or bumped into, like you would see in games like The Binding Of Isaac!
I want the code to be basic enough that I can add in some extra little details to the bounce, like maybe it'll grow a little bit then resize back down. I'm also wanting it be something that, instead of just writing this code every time I want something to bounce back, I can just have this code in a script and put the script in a little piece of code to use it.
For reference:
This is an RPG game where the sprites can only move 4 directions, like TBOI.
Also, as a side note, I'm not very experienced at this AND I'm still in highschool.
Thank you for reading this!
hopefully someone is kind enough to help me, as I know most of this community is ^-^