Stick Page Forums Archive

flash gamemakin' help

Started by: Nukem | Replies: 6 | Views: 697

Nukem
2

Posts: 1,333
Joined: Apr 2008
Rep: 10

View Profile
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.
Prince of PIMPs
2

Posts: 294
Joined: Dec 2007
Rep: 10

View Profile
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"
Ordinair
2

Posts: 298
Joined: Aug 2005
Rep: 129

View Profile
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.
Lixu

Posts: 3,859
Joined: Aug 2007
Rep: 10

View Profile
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.
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
Jun 24, 2008 6:48 PM #165870
Quote from Lixu
This 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.
Nukem
2

Posts: 1,333
Joined: Apr 2008
Rep: 10

View Profile
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)
Scorpioxxx
2

Posts: 1,454
Joined: Apr 2006
Rep: 10

View Profile
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.
Website Version: 1.0.4
© 2025 Max Games. All rights reserved.