Help please

Get help using Construct 2

Post » Sun Mar 03, 2013 3:34 am

Hi folks im very new to this construct 2 and started trying things out. ive got a problem atm that's completely stopping me at the moment.

i have a creature that moves by itself and goes towards a barricade now i want this creature to attack and destroy this barricade, ive made the collision and then off the collision told the creature to wait 1 second before doing 1 damage to barricade. here is where the problem is how do i loop it so while the creature is colliding with the barricade it carry's on doing damage after waiting for 1 second each time im sorry to ask this of you folks please help :)
B
9
S
1
Posts: 72
Reputation: 789

Post » Sun Mar 03, 2013 3:42 am

There may be a simpler way to go about this, but you could pin an invisible box sprite to the creature. While the box is overlapping the barricade, use an Every X seconds event to have the rest run every 1 second.
Using the box with Is Overlapping would allow it to check the proximity constantly, rather than only once like On Collision, which would be necessary to check if it should attack every second.grimwolf2013-03-03 03:43:11
B
6
S
1
Posts: 67
Reputation: 986

Post » Sun Mar 03, 2013 4:48 am

My idea: when creature start overlapping barricade then it stop (and play attack animation or something). And now just make event: when is overlapping barricade and every 1 sec and action: substract form barricade hp 1. After that creature will be standing very close to barricade (overlapping several pixels), attacking it and don't move forward.
B
9
S
3
G
3
Posts: 36
Reputation: 2,433

Post » Sun Mar 03, 2013 12:59 pm

ah fantastic hats given me a great help i mean also at the sound sof it i could put and invisible marker if the creature gets to close tyvm guys ill give this ago and let you know how it goes :)
B
9
S
1
Posts: 72
Reputation: 789

Post » Sun Mar 03, 2013 1:08 pm

yay success tyvm guys i spent hours working it out i never ever considered using a second condition to make the actions loop tyvm appreciated
B
9
S
1
Posts: 72
Reputation: 789


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Calfuso and 22 guests