Animation finishing condition not working

Get help using Construct 2

Post » Wed Aug 07, 2013 6:08 am

right now i'm having a lot of problems involving animations and AI.

I want the drone enemies to walk up to the player execute the 2 parts of the attack animation and if the player is still in range attack again ,if not, them just get in range.

but here after i tell a boolean(that makes the enemies move) to be set to true by an animation finishing it doesn't. and i don't see why.

https://dl.dropboxusercontent.com/u/198319749/last%20light.capx


about to tear my eyes out here...
B
4
Posts: 24
Reputation: 248

Post » Wed Aug 07, 2013 7:57 am

Was about to pull my hair out to

But i think i found your issue.

Almost in the top of your code you have:

system->every tick
You set the drone position to the "Drone_hitbox position.

As far as i can see it you try to move the Drone in your "Agressive" section.

try to "toogle disabled" on the two lines you have in the system->every tick and you will see the drones follow your player.

Notice that the hitboxes dont follow the player, but the drones do. So if you each tick set the position of your drones to that of the Drone_hitbox the drone will not move.

That was a lot of text, hope i made myself understandable.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 5:23 pm

@cvp
thanks a bunchload man, you were clear as...clean air,or something *burp*.

omg i fell so stupid right now ,the hitboxes don't have the animations on them so even though they are part of the same family they can't complet the events becouse they don't have the freaking animations that trigger the events!
and sinse the drones where stuck to them they couldn't complet it either!

now it gets tricky again tho ,i could just do away with the hitboxes and just use the drones ,but that really doesn't to the job well ,sinse they collide with each other and the player in a really weird way , and sometimes can even get one claw stuck to the others (which is particularly hilarious but not pratical at all)

sinse the drones have the animations and the animations are a really good way to keep the events flowing in a really smooth way, i need to find a way to make the hitboxes follow the drones(insteadof the other way around) and only colide with other hitbox sprites.

sinse the drone sprites have 8direction on them i can't just set the hitboxes to "solid" becouse it makes it impossible for the drones and their respective hitboxes to be on the same place at the same time.

...
wait here is the TRUE question, can i make a sprite with 8direction NOT collide with solids, but be stuck to another sprite that DO?
B
4
Posts: 24
Reputation: 248

Post » Wed Aug 07, 2013 5:48 pm

okay that won't work...sinse the drones are not stuck in any way to the boxes even if i find away to make the boxes colided only with each other(which i did) the drones will just keep on their mery way ignoring the boxes, if i stick them to the boxes they won't move becouse the boxes wont move .

what i need now is a way to put all the behaviors on the boxes ,stick the drone sprites to their respective hitboxes and find a way to trigger the animations properly.

how do i even....
B
4
Posts: 24
Reputation: 248

Post » Wed Aug 07, 2013 6:57 pm

Dont know if it would work, but you could play around with the collision polygon.

It you dont want the claws to get tangled up, you can just make the collision polygon of the drone a small box in the middle of the drone sprite.
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 8:05 pm

@cvp what do you mean by collision polygon?
*checks C2*

oh...

there are not enough curse words to express my fellings at my stupidity for not checking that small button under "set image point".

I spent so much time trying to use that "hitbox" sprite to do kind of what this small button does.

and well, i succeeded:

https://dl.dropboxusercontent.com/u/198319749/last%20light%20%282%29.capx

see,they all move along colliding with each other just as i want ,executing the animations at the right time , i even gave them the ability to track player movement when they are "charging"
their attacks.(tho they do it really baddly ,which is not bad sinse they are supposed to be weak starting enemies that spawn in big groups anyway).

i really wish there was at least a thumbs up button to thank people that are helpful and give em lil medals or something.
thanks a lot!

now to giving my player character more skills to use and try to implement new enemies, and polish the one i did, while keeping everything organised and avoiding repeating events unnecessarily for each one, and using the bloody collision polygon feature.

wait wait, a lil new issue right now ,when the player spawn an arrow and there are multiple enemies close by the arrow will interact with all the enemies it touches when being created. any way to make it only affect one?
B
4
Posts: 24
Reputation: 248

Post » Wed Aug 07, 2013 9:35 pm

A thx for the help on the forum is good enough for me


Hmm you download link shows an empty eventsheet... down know what goes wrong.

Do you destroy the arrow on impact?

Btw i love your graphics.. looks like a sketch.. but very nice proportions and look.cvp2013-08-07 22:21:44
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 10:48 pm

@cvp that's weird, well i'll just re upload it anyway

https://dl.dropboxusercontent.com/u/198319749/last%20light%20%283%29.capx

and thanks ,just trying toget something down that won't take my years to animate :p,i'll most likely just add colour and leave everything fairly sketchy
B
4
Posts: 24
Reputation: 248

Post » Wed Aug 07, 2013 10:56 pm

thats strange.. its the same.. What version are you using?

Lol... I should just go bed i think... it was just because the event sheet view was scrolled way down to the bottom where there were no events cvp2013-08-07 23:34:07
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Post » Wed Aug 07, 2013 11:37 pm

Have a look at this topic for the collision of multiple objects.

.capx
B
20
S
6
G
4
Posts: 347
Reputation: 4,451

Next

Return to How do I....?

Who is online

Users browsing this forum: Aquanex2, Johnzo, tarek2 and 1 guest