fredag 18 maj 2007

How to make a simple rpg game

Hello and welcome to "How to make a complete Rpg game Part 1".

Well lets not botter time at chatting....

Lets BEGIN!

Step 1:

First of make the "Character" and make it a symbol [F8]. Give him an instance name of; char.

Step 2:

Now to the script:
onClipEvent (load) {
speed = 4
}
onClipEvent (enterFrame) {
if (Key.isDown(65)) {
this._x -= speed; }
else if (Key.isDown(68)) {
this._x += speed; }
else if (Key.isDown(87)) {
this._y -= speed; }
else if (Key.isDown(83)) {
this._y += speed; }
else { this.gotoAndStop(1);
}
}

Step 3:

Now we want the guy to be able to pick up money. Ok, first up. Make a Dynamic text with the "Var"; totalmoney. Hit the first frame and paste this script on the frame;

totalmoney = 20;

now if u press Ctrl+Enter the dynamic text should say 20.

Now you have to make your coins or any kind of money, and make it into a symbol. And give the coin a instance name of coin. Now give the coin this sript;

onClipEvent (enterFrame) { ;
if (this.hitTest(_root.char)) ;
_x = -100;
_root.totalmoney += 1
}

Well thats all for this tutorial.

3 kommentarer:

Unknown sa...
Den här kommentaren har tagits bort av skribenten.
Unknown sa...

The total money just goes up by itself forever and I cant see the coin I made.

Neronix17 sa...

very badly done tutorial, needs more explanation and maybe you could complete it :O