Computer Science Canada Whatdotcolor Collision help (script fixed) |
Author: | sierius [ Sun Nov 16, 2008 3:56 pm ] | ||
Post subject: | Whatdotcolor Collision help (script fixed) | ||
Sorry about the previous post, I accidentally copied the wrong code then realized I could not edit. The problem is I want the square to stay above the platforms (represented by the black lines) but by using whatdotcolor not only does it not stay above the platform it completely ignores the fact that its there. Questions : Can someone show me how to make square stay above the black platforms? Sorry if this is a nooby question but I've been only learning for a few months. Do you suggest I use whatdotcolor to make my square stay above platforms or what other kind of codes? Edit reason : note to readers The variables coin and the the phrase "Time elasped :" are not finished because I was thinking of attempting to recreate a platformer game I found on this site once, they are fragmentations because I could now even get past the collision part, which I wanted to accomplish before moving into additional functions. Edit2reason: forgot to code |
Author: | DanielG [ Sun Nov 16, 2008 4:40 pm ] |
Post subject: | RE:Whatdotcolor Collision help (script fixed) |
I didn't manage to fix your problem, but I found 2 things that could affect it. First, your gravity of 2 could cause you to miss them on the way down in your check. The second problem is that you checked the color before redrawing them. so you need to move drawbg and level_tut_1 up. |
Author: | A.J [ Sun Nov 16, 2008 6:16 pm ] | ||
Post subject: | Re: Whatdotcolor Collision help (script fixed) | ||
I would say check for collision manually... I have an example that might help you : (The function you would want to check out in this example is the "checkIfOnLedge" function)
sry if this doesn't help... if u have any questions whatsoever, feel free to PM me ![]() |