*bump* Give damage to individual enemy

Get help using Construct 2

Post » Sat Mar 17, 2012 2:01 pm

Hello! Have been trying all day to make this work but still cant 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. Ill 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 havent 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 DONT 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 theres 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
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Sat Mar 17, 2012 2:26 pm

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
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Mar 17, 2012 2:41 pm

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, havent 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.MonDieu2012-03-17 14:43:43
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Sat Mar 17, 2012 3:18 pm

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.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Mar 17, 2012 3:25 pm

ok sure :) I wonder where I went wrong though.. feels like I painted myself into a corner LoL :)
B
21
S
7
G
4
Posts: 221
Reputation: 5,070

Post » Sat Mar 17, 2012 3:53 pm

orcKilling.capx
really basic no animation just dumb sprites. (:
Last edited by Yann on Sun Sep 14, 2014 9:18 pm, edited 1 time in total.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Mar 17, 2012 4:04 pm

Ok thx so much! Ill start working on it now :)
B
21
S
7
G
4
Posts: 221
Reputation: 5,070


Return to How do I....?

Who is online

Users browsing this forum: TELLES0808 and 19 guests