ForumsProgramming Forummapping problems with flash

4 3581
ZeroUltimax
offline
ZeroUltimax
10 posts
Nomad

I've recently started creating flash games, and i've encountered my first barrier. I'm currently making an RPG style of game.The battle system was pretty easy and the movement programming too, but let me explain my problem more in details.
I want my character to stay in the middle on the screen while he walks, not having to create a side scrolling game like zelda.i want my maps to be like final fantasy (the first ones)
one of my first idea was to mouse the map aroun the caracter, but it didnt work as well as i planned. can anyone reffer me to someone else or to a tutorial on this subject. please no "go look up rpg flash tutorial on google"
i tried and it was irrevelant. thank you all

  • 4 Replies
ZeroUltimax
offline
ZeroUltimax
10 posts
Nomad

yeah, i was pretty much expecting this as a reply, thanks a lot. im going to get in contact with him as soon as possible, but right now, im getting tired of computer, after all, 5 hour/day is tireing. of course, a genius like him must be busy too, bothered by everyone. ill find a way to talk with him, but if anyone else has suggestions, go ahead

dank
offline
dank
986 posts
Peasant

There are two ways to accomplish this: One, move the background instead of the map, or two, use the Flash V-Cam and make it follow the player.

ZeroUltimax
offline
ZeroUltimax
10 posts
Nomad

care to explain more about flash v cam?

ZeroUltimax
offline
ZeroUltimax
10 posts
Nomad

well dank, thanks for you post. i looked up V cam on google and i found it. i was thinking that there might be a way to integrate the code to character itself. after a lot of thinking, trail and error and testing, i came up with this code. (It's v-cam's code modified so it follows the character and leaves the screen the size of the stage.
to use it, you must make a new layer in the movie clip that you want to be followed. you should call it camera.
select the 1rst fram and insert the code bellow into it.


function camControl() {
_parent._x = cX-(this._x);
_parent._y = cY-(this._y);
}
// Capture stage parameters
var cX = Stage.width/2;
var cY = Stage.height/2;
// Make the stage move so that the
// v-cam is centered on the
// viewport every frame
this.onEnterFrame = camControl;
// Make an explicit call to the camControl
// function to make sure it also runs on the
// first frame.
camControl();


if something doesnt work out right with it, just ask me and i'll help you
thanks again dank

Showing 1-4 of 4