Rpg Help..... Wats Wrong Here

Hey im making an RPG right and i have set it up so my map moves and my character stays in one stop accept that he changes direction when he moves.

anwyaz i made 2 layers so far… one for the moving map and my character and one for my the stuff i dun want my player to walk into. I understand the hittest stuff but i dun know how to make it so my guy cant crash through my buildings…

heres ther fla… help appreciated… i cant figure out wats wrong …

Umm you should better check your code because you have billions of syntax errors and you forgot to close with }

is tat it?

here is my code on my dude… i think i fixed it alll…
( i cant believe i missed those ones that were there before)

onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_root.man.gotoAndStop(4);
}
if (Key.isDown(Key.LEFT)) {
_root.man.gotoAndStop(3);
}
if (Key.isDown(Key.UP)) {
_root.man.gotoAndStop(2);
}
if (Key.isDown(Key.DOWN)) {
_root.man.gotoAndStop(1);
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
play();
_x+= 5;
}
if (_root.man.hitTest(_root.stop,)) {
this._x -= 5;
}
if (Key.isDown(Key.LEFT)) {
play();
_x-= 5;
}
if (_root.man.hitTest(_root.stop)) {
this._x += 5;
}
if (Key.isDown(Key.DOWN)) {
play();
_y+= 5;
}
if (_root.man.hitTest(_root.stop)) {
this._y -= 5;
}
if (Key.isDown(Key.UP)) {
play();
_y-= 5;
}
if (_root.man.hitTest(_root.stop)) {
this._y += 5;
}
}

still says some things are wrong though

umm actually, no. Hit Test is a bit more complicated then that. What you have is only one thing to Hit Test with. So, when you load the game, your character is already “hit testing” the buildings because all the outer buildings on each side create a huge square(hit testable area).

I dont’ know if that made sense but what i’m trying to say is that you need a wall for north, east, south, west for each building.

wow thats one messy looking script.

i understand wat ur saying… example

if (_root.man.hitTest(_root.stop)) {
this._y += 5;
}
}

if (_root.man.hitTest(_root.stop2)) {
this._y += -5;
}
}
if (_root.man.hitTest(_root.stop3)) {
this._x += 5;
}
}
if (_root.man.hitTest(_root.stop4)) {
this._x += -5;
}
}

hows that?

How about putting a hittest action in each wall?

if (this.hitTest(_root.man) {
_root.man._x += -5;
}
}

isnt that wat i did…

i did four walls

stop,stop2,stop3,stop4

or did i do it wrong

i suppose you can do it either way, you can put all the code in one movie clip, or you can put each part of the code on each wall.

Okay, what you should do is just have the stage/bg color green and have the rest as one movie clip. If you have the BG that large extending out to the furthermost borders of your Flash document, it’s going to run at 1 fps, which is bad for performance reasons.

Have the roads and the houses as one movie clip, because if you go to modify-> document and change the BG color to green, you wont need to have the green as part of the movie clip and the game will run faster. Your layers are messed up too.

I’d totally revamp the game if I were you.

[QUOTE=MoNgOlIaN]Okay, what you should do is just have the stage/bg color green and have the rest as one movie clip. If you have the BG that large extending out to the furthermost borders of your Flash document, it’s going to run at 1 fps, which is bad for performance reasons.
QUOTE]

That’s not true… just look at my game… unless your computer’s slow…

http://baiwanfuong.notix.net/tienzsiyusi.htm

Awsome rpg, dude! The graphics are nice and easy on the eyes :slight_smile:

dude how did u do that… thats amazing…

like man…

u saw my scripting on my fla and how my guy moves…

did u do it liek that 2?

Thanks!

I haven’t seen your FLA…

That’s a pretty cool game, nice graphics. But how’d you get it to go that far off the stage?

Nicely done.

Thanks… to create a map that large I had to create a movie clip… and then put the map in the movie clip… and then I scaled down the map… then I edited it from there…

lol sorry… its there i think though… u could

very nice…

u do all that urself…

think of storyline and stuff

u got good skills in flash… u learn all this urself or through turtorals…
if u learned through turtorials please post which ones helped u with the rpg the most

Thanks… but the truth is… I learned my flash from a very good programmer… he learned all that he knows from many tutorials at this site… but I don’t know which ones…