attack

  1. Palocles

    SOLVED Trying to display one sprite followed by another in same state

    Hopefully this is simple, I don't want to spam the forum with questions... So i've got a state engine and need a couple of states to run multiple sprites. This works ok for jump where a different sprite is running for upwards movement to the downwards movement sprite (if/else) statement. I'm...
  2. Gorshalox

    How to make enemy(walking,attack)

    I'm making ma first game(2d platformer) in GMS language,i don't know how to make enemy to walk to player and attack him,pls help me
  3. F

    Change direction attacking

    My character when attacks, he turns only to the right. I can't make he turns to left and attack looking to left while walking. He turns if he's stopped, but if he's not, the animation change to the right. if keyboard_check(vk_space){ sprite_index=character_Attacking_Right;image_speed=1; }...
  4. Z

    GML Trouble with Enemy Attack Sprite Manipulation

    I have just completed the wonderful GML2 Complete Platformer Tutorial series by Shaun Spalding on Youtube. The code is identical to how he set up his simple shooter, I have just changed the art and little details and values here and there, and everything works! However, my enemies do not have...
  5. D

    Attack State Animation Will NOT End

    Hi guys. So I've set up a simple attack state using a switch statement, but two things occur and I can't for the life of me figure out why. 1. Upon pressing the attack button the attack animation continues to play, but it does transition to my move state and allows me to move like normal and...
  6. 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...
  7. M

    Legacy GM Help With a Script

    I'm trying to make a chain lighting attack, by making the "bullet" jumping to the next target (max 3), but I think I'm making in the bad way. Here is the script in the bullet //Create target = ds_list_create(); ds_list_add(bersagli, "obj_enemy"); ds_list_add(bersagli, "obj_enemy")...
  8. Alexir

    GML Wave type attack?

    I'm trying to make a wave type effect, where an invisible object is created, shot in a direction, and every set time increment a different object spawns on top it, which is the actual attack, creating a trail of attacks. To give you an idea of what I was trying to do here is my code that is not...
  9. T

    Attack states

    Hello, how can I enable single button combo attacks into this? Any help much appreciated. Thanks, Lionel
  10. Meowanator

    Legacy GM Make only one sound effect play?

    In my game, I have it so a sound is played when it gets hit which works when only one enemy is hit. But if there are multiple enemies hit at once, it plays the sound effect for each of them, causing a super loud hit sound. Is there a way to make the sound effect play once for all of them? if...
  11. X

    GMS 2 enemy stops moving (again)

    when i walk over the enemy, they stop moving. everything else is functional code: vantoid_stomper step vsp+= grv; switch (state) { case ENEMYSTATE.FREE: EnemyState_Free(); break; case ENEMYSTATE.HIT: EnemyState_Hit(); break; case ENEMYSTATE.DEAD: EnemyState_Dead(); break; case...
  12. J

    Need Help with Attacking Animation

    Hello everyone, I'm not totally sure if this belongs here, so please be gentle. I'm working on a metroidvania currently, but I am god awful at making sprites and animations. I've gotten around this like a lot of devs I've seen on Game Maker by using small resolutions for sprites. I'm currently...
  13. X

    GMS 2 (SOLVED) enemy stops moving

    hi there. there are many problems im having with the enemy but this is a big one when i touch the enemy, both the enemy AND the player get stuck. code: PLAYER: CREATE: hsp = 0; vsp = 0; grv = 0.4; walksp = 8; hp = 100 state = PLAYERSTATE.FREE hitbyattack = ds_list_create(); enum PLAYERSTATE...
  14. M

    GMS 2 enemy attack hitboxes, need help please

    I have made an enemy that attacks a player (with a spear) and i made a hitbox for it to allow for more precise dodging from the player. Problem is, when my player attacks the enemy and the enemy goes in to a stunned sprite the hitbox would still be there till the animation ended... i want this...
  15. BigCat

    How to check if a player is facing another...

    I'm building a top-down shooter. I have a target-A which basically sits in the center of the room I have ships which fly around the room in various formation patterns or whatever. The ships have laserbeams that fire directly forward. I want the ships, as they fly about the room - to check...
  16. X

    i cant attack

    hello, its me again! i keep having problems. im following shaun spalding's melee tutorial and i cant attack? the game turns on but it wont attack when i press z. and when i turn left it stays facing left, even if i go right. here is ALL my code for player create hsp = 0; vsp = 0; grv = 0.4...
  17. A

    Cant figure out auto-attack for platformer

    Hey guys! ive been working on a platformer recently and i cant for the life of me figure out how to auto-attack enemies (moving quickly to the enemy hitbox point, which is y-16) when the player is near them and a certain key is pressed. below is a beautiful artistic example of what i mean...
  18. B

    GML Hitbox Doesn't Work

    So ive made a character and a hitbox and then put in collission code between my hitbox and my enemy but it appears i made a mistake. Can anyone help me? My attack code is hsp = 0; x = x + hsp; image_speed = 2; sprite_index =...
  19. B

    GML 1 hit kill

    Hello everybody i created a attack system but whenever i hit a enemy or the other way arround it is a one hit kill even though my set dmg isnt equal to its health (in my creation code the Cdmg = 0 and Ehp is set to 100 in my enemies create script) My attack code is : else if ((attack...
  20. B

    GML Stationary attack and attack animation problems

    Hello everyone my name is Ben, I just started using gamemaker and i am usingit for a school project. This is my code so far except i have 2 problems 1) My attack animations doesnt seem to play al the wat 2) I dont know the code to make my character attack when he is stationary Note: changing...
Top