help please

Get help using Construct 2

Post » Sun Sep 08, 2013 7:50 pm

hey guys ive got a problem which i cant wrap my mind around basically the scenario is that i want to spawn several creatures and then they match towards a wall once they reach the wall they start attacking but i don't know how to make them all attack and take health away based on them all attacking. i have nothing to show you at the moment apologies.

Thank you for any help given
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Mon Sep 09, 2013 12:50 am

Hey Dark,

Try and think about the interactions like the way a light switch works. You can add variables to your 'soldier objects' to check the current state and based off that variable give each soldier commands to follow.

Is the soldier touching wall already? No? Then turn on the switch to make them march.

Is the soldier touching the wall? Yes? Then turn on the switch to make them stop marching and attack.

Is the soldier attacking? Yes? then subtract 1 from the wall's life total once per attack animation.

I know its pretty general, hope it helps.
ImageImage
B
123
S
23
G
7
Posts: 1,071
Reputation: 13,091

Post » Mon Sep 09, 2013 12:41 pm

that's great tyvm. couldn't figure it out at all
B
19
S
6
Posts: 143
Reputation: 1,835

Post » Mon Sep 09, 2013 1:14 pm

hmm i got another query got them attacking but when multiple creatures are attacking wall it only takes away 1 health instead of each individual creature
B
19
S
6
Posts: 143
Reputation: 1,835


Return to How do I....?

Who is online

Users browsing this forum: blackhornet, Euduardo, Kin, mikehive, ratboy3, tinhofiel and 36 guests