On collision

For questions about using Classic.

Post » Thu Dec 10, 2009 5:03 am

im trying to have some actions take place while 2 objects are colliding. otherwise, some other actions will happen.

so:

on collision between obj1 and obj2: actions*
else: actions*

but what happens is the actions under the collision event only happen for a single frame, and then the else actions take place...even though the objects are still colliding. im guessing this is because the even says "on collison"; the moment it happens. this isn't very useful though. what else can i use?
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Dec 10, 2009 5:10 am

overlap?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Dec 10, 2009 5:15 am

doesn't seem to work. the object that i do the colision test on is on a layer under the object it needs to colide with..which is why it's not working i guess.

edit: it does work (retested it) but it triggers the actions under the event for all the objects; even those that are not colliding
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Dec 10, 2009 5:19 am

Post your .cap so people can take a look and help more. Should work fine.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Dec 10, 2009 5:25 am

this is with the "on collision". you can see the row get highlighted for a single frame when you drag the platform up to it. (click on a platform to select it, middle mouse button to "drag" it up to the row bellow/above). when you have a platform on a row, the highlight for that row should be red and its private variable "available" should = 0. availabe = 1 and the row is green when there is NO Collisions.

http://www.box.net/shared/134hcfj91o
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Dec 10, 2009 8:18 am

Hmm it's asking for a plugin I don't have, color lines I think it is? It wont load for me. :\

Have you made the else event a sub condition/event, that might stop it happening all the time and only when triggered?
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Thu Dec 10, 2009 8:33 am

using this effect here: viewtopic.php?f=7&t=1438

sorry :V
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Dec 10, 2009 8:55 am

Now it asking for a other .fx.
How many costum .fx are you using in your cap.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Post » Thu Dec 10, 2009 8:59 am

bah. hue tint is the other one im using. i thought it was standard in construct.

http://www.box.net/shared/a2m4vzb61b

that is most definitely the last one. sorry >_<
B
2
G
3
Posts: 12
Reputation: 874

Post » Thu Dec 10, 2009 9:14 am

change it to this.
B
21
S
4
G
4
Posts: 280
Reputation: 2,934

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests