flash gamemakin' help
Started by: Nukem | Replies: 6 | Views: 697
Jun 23, 2008 2:21 AM #163693
alright, I've finished getting a figure to walk, attack, jump, etc. but I cant make a freaking ground! seriously, the person just falls through and I don't know how to code it to make it a stable surface for the guy to stand on. help will be awesome.
Jun 24, 2008 6:00 PM #165770
OMFG, thats a good point, man. I'd like to learn this also. so I'll have ta "BUMP"
Jun 24, 2008 6:16 PM #165796
Well it really depends on how you've coded it so far.
You could do something like, 'if the movie clip's y value is less than** or equal to the ground's y value, the movie clips y value is set to the grounds y value.'
**Note that I if that doesnt work try greater than because I think the grid in Flash is backwards I cant remember.
You could do something like, 'if the movie clip's y value is less than** or equal to the ground's y value, the movie clips y value is set to the grounds y value.'
**Note that I if that doesnt work try greater than because I think the grid in Flash is backwards I cant remember.
Jun 24, 2008 6:20 PM #165807
This is all bullshit. Make a ground, say grass field. Make it a MC. Give it the var of "grnd" or "ground" dont remember.
Jun 24, 2008 6:48 PM #165870
Quote from LixuThis is all bullshit. Make a ground, say grass field. Make it a MC. Give it the var of "grnd" or "ground" dont remember.
Well done you have a movieclip with a variable name now, just script it now.
Jun 24, 2008 8:43 PM #166080
I dont know how to code it though. I know it has to be Movie Clip. but what code does the ground need?!? (just give a general idea of what the code should be then I'll figure it out from there, full code would be epic)
Jun 24, 2008 10:01 PM #166194
onClipEvent (enterFrame) {
if ( this._y > _root.ground._y) {
this._y == _root.ground._y
}
}
This won't work, i'm sure of that but it gives the general idea.
if ( this._y > _root.ground._y) {
this._y == _root.ground._y
}
}
This won't work, i'm sure of that but it gives the general idea.