00:00
00:00
Newgrounds Background Image Theme

MoxKatt just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

GTA Tutorial

Share Collapse

Author Comments

In this tutorial, learn how to switch controls between car and foot!

Log in / sign up to vote & review!

Stolen-Script

This actionscript is stolen from one of the Newgrounders who made a flash GTA tutorial. I don't remember what his name was, but this actionscript is stolen from him!

Kinda weird

hey man can you make it so the man rotates when he walkes it would be much appreciated

good, but...

the car script was kind of weird, so i tweaked it a bit
//These are the cars variables.
onClipEvent (load) {
speed=0;
}
//This makes the car move forward.
onClipEvent (enterFrame) {
if (Key.isDown(Key.SPACE)&& _root.person._visible==false) {
speed += 1;
}
//This makes the car move backwards.
if (Key.isDown(Key.UP)&& _root.person._visible==false) {
speed -= 1;
}
if (Key.isDown(Key.DOWN)&& _root.person._visible==false) {
speed += 1;
}
//The car will start to slow down after the speed of 25
if (Math.abs(speed)>25) {
speed *= .6;
}
// This will change the angle of the car
if (Key.isDown(Key.LEFT)&& _root.person._visible==false&& speed!=0) {
_rotation -= 15;
}
if (Key.isDown(Key.RIGHT)&& _root.person._visible==false&& speed!=0) {
_rotation += 15;
}
// This will make the car move
speed *= .98;
x = Math.sin(_rotation*(Math.PI/180))*spe ed;
y = Math.cos(_rotation*(Math.PI/180))*spe ed*-1;
if (!_root.move.hitTest(_x+x, _y+y, true)) {
_x += x;
_y += y;
} else {
speed *= -.6;
}
}
//Thats it! Dont forget to give it the instance name of car!

Now i can make my GTA game better

Thanx

5-5

great job!, now i can do actionscript!

Credits & Info

Views
10,098
Faves:
8
Votes
13
Score
2.44 / 5.00

Uploaded
Aug 15, 2005
9:54 AM EDT