Solved

# RPG Scrolling Game

Posted on 2009-12-27

Hello I am in process of a game and I have current movement so far:

onClipEvent (load) {

movespeed = 5;

this.previous_state = "standing";

this.current_state = "standing";

}

onClipEvent (enterFrame) {

if (Key.isDown(Key.LEFT)) {

this._x = this._x-3;

current_state = "left";

} else if (Key.isDown(Key.UP)){

this._y -= 3;

current_state = "up";

} else if (Key.isDown(Key.DOWN)){

this._y += 3;

current_state = "down";

} else if (Key.isDown(Key.RIGHT)) {

this._x = this._x+3;

current_state = "right";

} else {

current_state = "standing";

}

if (current_state == "standing") {

gotoAndStop("standing_seq");

} else if (current_state == "right") {

if (previous_state == "right") {

nextFrame();

} else {

gotoAndStop("right_seq");

}

} else if (current_state == "left") {

if (previous_state == "left") {

nextFrame();

} else {

gotoAndStop("left_seq");

}

} else if (current_state == "up") {

if (previous_state == "up") {

nextFrame();

} else {

gotoAndStop("up_seq");

}

} else if (current_state == "down") {

if (previous_state == "down") {

nextFrame();

} else {

gotoAndStop("down_seq");

}

}

previous_state = current_state;

}

But I need a way for a scrolling camera to follow it, can anyone help?

I have tried vCam but I can't get it to work.