Attack problem

Hello guys :)
I need a little help with this:
i made some animations for the player like when i press return he attack and when he collide the atk with enemy
the att enemyHealth goes to -1
but when i do this all enemies dies in the scene haeuhuaehuae
i think i need something like this
when my enemy is on the distancefromplayer < 5 "pixels" or in front of the player
i will can kill him but only this enemy
i tried to make this rule but is not working
any tip for this problem? =)

Comments

  • LumpAppsLumpApps Member Posts: 2,881
    edited July 2013
    First please explain what kind of game you are making. A fighter?
    Is your enemyHealth a global (game.) attribute? Or a local (self.) attribute in the enemy actors?
  • mmmodelmmmodel Member Posts: 46
    my att is global :S
    hmm so i need to put a local att..
    we found the first error heuheuheuhe

    the game is something like zelda snes
    i made the open world with monsters and plants
    but i still thinking that i need some distance set for the player and enemy
    i did something like this for the enemy to follow the player and atk after 0.5 seconds
    is working good...

    any tip for making the distance between player and enemy for successful atk @LudwigHeijden?
  • mmmodelmmmodel Member Posts: 46
    edited July 2013
    i used the magnitude rule and
    now is working o.O hahahahaha
    now the only problem is the health of the enemy
    let me explain
    i did what u told me
    now i have two enemies
    enemy 1 and enemy 2
    i made self myLife for each one
    but if i kill one i still killing the another monsters
    any tip?
  • mmmodelmmmodel Member Posts: 46
    hahahahaha now is everything working
    i am like doctor house
    after some time thinking
    and thinking
    I encounter the answer
    HEAUHAEUHUAEHUEA
    thank you @LudwigHeijden :)
Sign In or Register to comment.