*bump* Give damage to individual enemy

  • Hello! Have been trying all day to make this work but still can�t fix it.

    On the layout I have the player and three enemys (orcs) that I want to recieve damage individually. Experimented with families and UID after recieving an example capx from someone here at forum. I�ll post my capx so you can see what I have so far:

    game

    use arrow keys to move press C to cast spells (and X just plays a attack with staff animation), hold sh*t while moving to walk.

           edit:       LOL spelled "shift" wrong

    I plan to add more kinds of enemies if this can be solved.

    Thx!

    (march 17)

    Edit:

    Still haven�t been able to solve this one. Tried to do the same thing in GM8.1 with some GML and was done in 5 minutes since every instance of an object get its own creation code, but I DON�T want to use GM8.1 because C2 is so much better in so many ways!! There has to be a sollution to this! :)

    So if there�s anyone here can take a look at the posted capx (you need to have licensed C2) and help me out I would be extremely grateful!game

  • First, what is the use of the orc_mask ?

    Second, shouldn't it be easier to name your animation "running_0" "running_45" "running_90" etc and just make one call like Set animation to "running_"&self.DIR ?

    Third we'll see after you answered these question, but what you wana do is pretty doable

  • the orc_mask is (and this goes for player_mask also) so he can walk up to the upmost wall and still be visible.

    Edit: and also be half visible when walking behind a wall.

    The original collisionbox has been altered to interact in the correct way with sidewalls, haven?t found another way to achieve this. as for the naming of the animations I never knew that you could use part of the name and add &self.DIR.

  • Ok I think I understand, you use the player_mask sprite so the feet only collides with walls, the player_collision is in fact a hitbox, and then the player is just the visual.

    And you do the same for orcs.

    That makes sens and I would probably do the same.

    However, your capx is already too complex for me to make any changes. I prefer starting from scratch and show you the how to with it.

    You'll probably understand better and be able to implement it in your own capx.

  • ok sure :) I wonder where I went wrong though.. feels like I painted myself into a corner LoL :)

  • orcKilling.capx

    really basic no animation just dumb sprites. (:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ok thx so much! I�ll start working on it now :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)