knockback

  1. Purple_Shy_Guy

    I wanna do a megaman like knockback in my top down game

    This is my first project, so I'm having a bad time trying to figure out how to do it. My knockback wasn't working somedays ago, and the community helped me, so it's working now. But I want to make a knockback just like the one in megaman, because I think it's really dynamic. This is the code I'm...
  2. Purple_Shy_Guy

    SOLVED My Character's knockback is only half working and I don't know how to fix it.

    I'm trying to program a knockback for when the caracther is hit by an enemy, but it's olny half working. if (place_meeting(x+sign(move_speed), y, Obj_Slug)) { x-=move_speed*15; } if (place_meeting(x-sign(move_speed), y, Obj_Slug)) { x+=move_speed*15; } if (place_meeting(x...
  3. E

    Knockback Top down

    I am creating a top down, but the player and enemies sprites only face left and right in a cartoonish way. I am trying to create knockback and have tried many different ways, it seems as though it should be simple and I believe it is, I just can't figure it out. This one code here stumps me, I...
  4. FoufaDjo

    GMS 2 [SOLVED)How can i save previous value of an variable

    am making a knockback system and am stuck at returning the knocked player direction to his original direction here is the code: //Knockback knockback = max(knockback-3.4,0); if knockback = 0{ knockbackon = 0; } if knockback > 0{ knockbackon = 1; } if knockbackon = 1{ direction =...
  5. FoufaDjo

    GMS 2 [SOLVED] attack (hit) player multiple time by diffrent other players att the same time!

    so am creating a topdown 2v2 game and i found my self stuck on the dmage system. right now i have diffrent controls for the same hero and all 4 players play the same hero so its the same object. the player can knockback multiple other players but the player that got hit cant be targeted by...
  6. M

    Need help being reflected/knockbacked from an object

    Trying to make a mechanic similar to Ori and the blind forest where the character can hold right click and after a certain amount of time be reflected/knockbacked to the same direction the mouse is facing. I got the timer to work but it shoots my character vertically. Looking for it to shoot...
  7. S

    top down knockback

    im having issues with knockback for a top down game. im trying to get some knockback on my character for when he is shooting, but i cant get this working because my character rotates towards the mouse. i was thinking about using lengthdir but i don't understand how to implement this, anyone got...
  8. A

    GML Knockback Effect Help

    Hello I was working on my knockback effects in this game I am just getting the player mechanics done before adding any thing else. But I ran into a problem. The entire script will be below and the link video to give a visual to what my problem is. Now if you look at the video it looks as if...
  9. D

    GMS 2 Precise Enemy Knockback

    Hello! This is my first post on this forum. I haven't done any programming in a long time so I'm very rusty, not that I was a professional before or anything. My code is very messy and disorganized but the game operates pretty well so far. But I've just been having trouble trying to get any sort...
  10. B

    GMS 2 Character Knock back Doesn't Exist (SOLVED)

    I made sure I typed down everything from this tutorial video. I added the enemy knockback code, and it works just as I expected. But when I added on the player character (and made sure to copy the code from the video), all I get is this tiny message: It didn't crash the game, but it...
  11. R

    Flinch effect (knockback when player takes damage)

    Hi there! I am new on Gamemaker Studio 2 and been following Shaun Spalding's youtube videos as I wanted to make my first platformer game. My obj_Player moving system looks pretty much like his: var move = key_right - key_left; hsp = move * walkspeed; vsp = vsp + grv; x = x + hsp; y = y + vsp...
  12. Z

    Horizontal Platforming knockback for shields

    Lately I have been having issues with implementing a knockback code for a particular type enemy that carries a shield and can only be attacked from behind. When performing an attack on the enemy's shield the player is suppose to be slightly pushed back from the strike. However, when implementing...
  13. E

    GML OK guys i'm new and i'm having issues this might be simple

    I'm playing around trying to learn I've searched and read around, but i'm not saying i didn't miss something super simple that would fix this so first things first thank you for your time!! So i have a player object and 2 enemy objects(same object just drug into room twice). What i want to...
  14. S

    knockback not working

    So the knockback when an enemy touches the player doesn't work very well and nearly kills the player instantly since the player's health is only five. Here is my knockback code: obj_player.hspeed_ = random_range(-14,14) obj_player.y += -4 so for this I was going to add invincibility...
  15. G

    Design ARPG combat system feel

    I was making a combat system for a action rpg game, but I noticed that it doesn't feel very good. How would I make it feel better? Should I use physics? Knockback or not? (Currently I'm not using physics and have a simple knockback). I wasn't sure if I should post this in the programming thread...
  16. O

    Enemy KnockBack Help

    Hi guys, so I don't really understand what is going on here. Basically, im trying to add a knockback to my zombie enemy but it's not working. I've basically created 2 script states. Zombie_Movement and Zombie_KnockBack when the bullet hits the enemy the state changes to Zombie_Knockback, I then...
  17. J

    GMS 2 Having knockback issues with my 2D platformer

    v2.1.3.189 My game (loosely based on "Beowulf") has a character who can press 'x' to swing his sword. This creates my (obj_sword_hitbox) in front of the "obj_player" for a single frame. When the (obj_sword_hitbox) collides with (obj_enemy_parent), I want to create a knock-back effect on the...
  18. C

    2D Platformer Knockback

    I'm using the code from this video, I tried searching all throughout the internet for a good tutorial for 2d platformer knockback, however the ones i could find allowed the player to move after being hit, or were for other genres of videogames,like topdown shooters. Could anyone please either...
  19. J

    GMS 2 Knockback

    Hi all, I have a problem with creating knockback. I want a player to have a little bit of horizontal and vertical speed when hit by a bullet. So when colliding with a bullet, the variables hsp and vsp of the player should change. However only vsp changes! Heres my code i have in the step event...
  20. G

    Asset - Objects Attacking with knockback (Now for free!)

    Marketplace link: https://marketplace.yoyogames.com/assets/6108/attacking-with-knockback Are you making an action rpg? Need knockback? Then this is for you. Attacking and knockback. In the video below you can see it in action. Unfortunately I'm not good at animating so it maybe doesn't look so...
Top