Events don't work anymore :O [SOLVED]

Post your own tutorials, guides and demos.

Post » Mon Jul 12, 2010 4:09 am

Hi

I was making an RTS game with Construct (0.999). I did it for many hours and then I noticed some problems. Units didn't avoid themselves (and solid objects) anymore? Also, when I click my units, nothing happens.

So I deleted all other events except those but the problem still occurs (I don't want to share the whole source unless it is necessary). Here is the game with those buggy events.

It would be really helpful if someone could check this file and tell me is this a (serious?) bug in Construct or something else?
B
5
S
2
G
8
Posts: 53
Reputation: 3,222

Post » Mon Jul 12, 2010 2:47 pm

Your blue tank image doesn't have a collision mask, so there's no way for the M&K object to know if the mouse is over a tank when you click it, or for your units to know if they're overlapping each other.

To add a collision mask, open up your blue tank sprite; now click on the "Collision mask" button on the top toolbar(it's the green icon second from the right) - As you can see, the collision mask is empty; now, just fill in the area with a solid color for the collision mask and you have working collisions again! Just press the "Collision mask" button again to close the editor for it.

Hope that helps ya. :)
Moderator
B
99
S
38
G
19
Posts: 1,584
Reputation: 17,942

Post » Mon Jul 12, 2010 3:10 pm

Hey, that really helped :) I think that the tank HAD a collision mask before and now I wonder where did it go :o But anyway, now it works. Thanks :)

I think the RTS "avoid moving over units" isn't still perfect as the tanks still go a little bit over themselves but that doesn't matter.
B
5
S
2
G
8
Posts: 53
Reputation: 3,222


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest