-
GTA type game help *_*
I have this game that the camera follows the character like GTA well here is the action script for the guy you need to give it instance name of hero and you need to make your scene in the background convert to symbol and instance the name to map
COPY and PASTE if you want but I want this so that the camera follows the guy but i want my guy to be able to get in a car and have the camera still folllow if you played GTA befor you will know what i'm talking about PLZ help
onClipEvent(load){
_global.speed=5;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.UP)) {
play();
_root.map._y -=-_root._global.speed;
_rotation= 0;
}
if (Key.isDown(Key.DOWN)) {
play();
_root.map._y -=_root._global.speed;
_rotation=180;
}
if (Key.isDown(Key.LEFT)) {
play();
_root.map._x -=-_root._global.speed;
_rotation=270;
}
if (Key.isDown(Key.RIGHT)) {
play();
_root.map._x -=_root._global.speed;
_rotation=90;
}
if (Key.isDown(Key.UP)) {
if (Key.isDown(Key.RIGHT)) {
_rotation = 45;
}
}
if (Key.isDown(Key.DOWN)) {
if (Key.isDown(Key.RIGHT)) {
_rotation = 135;
}
}
if (Key.isDown(Key.LEFT)) {
if (Key.isDown(Key.DOWN)) {
_rotation = 225;
}
}
if (Key.isDown(Key.UP)) {
if (Key.isDown(Key.LEFT)) {
_rotation = 315;
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|