Animation issue [SOLVED]

Get help using Construct 2

Post » Tue Aug 20, 2013 5:20 pm

Hi guys,
this the issue.

I spawn some enemies left/right the screen.
Then I will kill them touching them 2 or more times.
When I hit or kill one of them an animation start.

I was using the bad method to animate a platform object and this give me problem with keyboard input (also if keyboard not was present, very strange).

I have solved adding and pinning an object animation to the enemy but When I hit it, sometimes, the enemy was killed but its death animation does not start and the animation object remin uptight and stop (this last is correct because the object who was pinned is destroied)...

I tried adding some instance variables but I cannot solve the issue.
Sorry for my bad English.
The cap, I think was better then 1000 bad words:

https://dl.dropboxusercontent.com/u/190108463/Enemy.capx

Thx in advance to all...

Bye, Parside.parside2013-08-22 23:32:15
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Aug 21, 2013 10:34 am

Anyone?
Please help...
Thx...
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Aug 21, 2013 11:35 am

I had a look into this and the bug is caused by being able to spam the clicks. If you up the wait time from 0.1 this issue occurs less but I couldn't get it to stop completely.
B
47
S
17
G
82
Posts: 2,230
Reputation: 48,607

Post » Wed Aug 21, 2013 3:02 pm

Thx, I will try...
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Aug 21, 2013 4:33 pm

Hmmmm....
I tried but it does not resolve all the issue...
Some others tip?
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Wed Aug 21, 2013 5:08 pm

Problem is you are selecting multiple instances of the enemy object when they overlap and so the enemy object can be destroyed without the enemy-animation being touched 2 times.

You should find a way to pick only the enemy to which the animation is pinned.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Wed Aug 21, 2013 6:28 pm

You typically do this by storing the UID of your paired object. Often it's handy to have both objects know about the other so that whichever is picked first, you can then pick the other.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Wed Aug 21, 2013 7:07 pm

Thanks to all for the replies...
I have update the files trying to pick only one objects.
Now is better but something the issue is present.
Womeone can help me?

https://dl.dropboxusercontent.com/u/190108463/Enemy.capx
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Post » Thu Aug 22, 2013 2:51 am

Enemy_BHT.capx

Sorry, I changed a bit more than I needed. The key was actually the 'For each'. You have to test the touched objects individually.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Thu Aug 22, 2013 12:39 pm

Thx a lot...
I will do a look at it...
Thx again...
B
13
S
4
G
1
Posts: 74
Reputation: 1,230

Next

Return to How do I....?

Who is online

Users browsing this forum: newt and 22 guests