How do I Detect ANY animation ending, solid objects

Get help using Construct 2

Post » Fri Feb 27, 2015 3:00 pm

I have an "Attack" object that represents a sword swing, and I spawn it and use it to detect when you hit something with your weapon. I figured every melee weapon is more or less the same, so they all use the same object. Each weapon should look different, so that sprite has like a dozen animations. I've been using the animation: OnFinished trigger to destroy the attack, but it seems to require the name of the animation, and I have bunch of animations that all do the same thing. Can I perhaps use a wildcard?

My other question was about collisions. I was wondering if there is a way to detect collisions with solid objects, even without picking the collided object? There are the overlapping and overlapping at offset conditions, but they require a specific object or family. Can I use these conditions with "any solid"?
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Fri Feb 27, 2015 4:46 pm

1. use the Sprite.on any finished.

2.Just put all collidable objects into a family, then test on collision with that family.
Nothing goes unanswered!
B
24
S
5
G
1
Posts: 434
Reputation: 3,446

Post » Fri Feb 27, 2015 5:25 pm

1. omg I can't believe I missed that.....
2. That's what I was doing. I'm kinda tempted to create a custom behavior that uses runtime.testOverlapSolid(), but I'll leave it for now, unless it becomes a serious pain.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 10 guests