|
-
cant make platforms move up and down!!
okay well yes i did make my platform move up and down but when the hero jumps on it he falls right through it like it isnt even there.. i have this code in the platform
onClipEvent (load) {
velocity = 3;
}
onClipEvent (enterFrame) {
var y;
y = _y-velocity;
if (y>260 || y<105) {
velocity = velocity*-1;
}
_y = _y-velocity;
}
and this code on the frame of the platform
maxPlatforms = 0;
for (i in this) {
if (typeof (eval(i)) == "movieclip" && substring(i, -10, 5) == "platf") {
maxPlatforms++;
}
}
stop();
-
Senior Member
I have no idea what the platform frame code is suppose to do, but I suppose it doesnt affect any way the problem of your hero falling through it.
Maybe its better, if you post the hitTest code you have, where your hero is testing if he is on the platform.
-
Maybe they forgot to even do HitTest.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|