00:00
00:00
Newgrounds Background Image Theme

ShogunAfterDark 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!

As: Mini Rpg

3,073 Views | 32 Replies
New Topic Respond to this Topic

As: Mini Rpg 2005-12-16 21:30:28


ok this is my first tutorial so here it goes

Tutorial:
this tutorial with cover the basics of an rpg and a little more.

ok first make a circle and convert it to a movieclip or highlight thewhole circle and press F8 and make sure its a movieclip....now click the circle and go to the top of your screen and go to Windows/Properties/ then a window should come up...now change the instance name to "hero" without the " "...now open up your actions window and put this code in:

onClipEvent(load){
ms=10;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y-=ms;
gotoAndPlay(21);
}
if(Key.isDown(Key.DOWN)){
_y+=ms;
gotoAndPlay(23);
}
if(Key.isDown(Key.LEFT)){
_x-=ms;
gotoAndPlay(24);
}
if(Key.isDown(Key.RIGHT)){
_x+=ms;
gotoAndPlay(22);
}
if(Key.isDown(Key.SPACE)){
gotoAndPlay(2);
}
if(_y>400){
_y=400;
}
if(_y<0){
_y=0;
}
if(_x>550){
_x=550;
}
if(_x<0){
_x=0;
}
}

now if you test it it should move up down right left with the arrow keys..

now make a long rectangle and convert it into a movieclip.....when you done with that open up the action panel and put in this code

onClipEvent(enterFrame){
if(this.hitTest(_root.hero)&&_root.hero._y
<_y){
_root.hero._y-=_root.hero.ms;
}
if(this.hitTest(_root.hero)&&_root.hero._y
>_y){
_root.hero._y+=_root.hero.ms;
}
if(this.hitTest(_root.hero)&&_root.hero._x
<_x){
_root.hero._x-=_root.hero.ms;
}
if(this.hitTest(_root.hero)&&_root.hero._x
>_x){
_root.hero._x+=_root.hero.ms;
}
}

now....try it and see if it works....it should stop you...like a boundry...

ok now we will make something used alot in rpg's

ok find your font tool and click in the frame... now go to your properties panel and if you look you will see "static text" and change that to "dynamic text" when your done with that try and find your variable text its next to what its called var. and type in "money" in it......now go to your time line and click your frame and it should highlight everything in the frame and then go to you action panel and put this in it:

money=0;

(change the zero to any number you want if you like)

ok now make a square and make that into a movieclip now open up your action panel for the square and put this in it:

onClipEvent(enterFrame){
if(this.hitTest(_root.hero)){
_root.money=100;
_visible=false;
}
}

now! you should have something like this
http://img471.images..torialsamples4rh.swf

Response to As: Mini Rpg 2005-12-16 21:44:32


thats pretty good man

Response to As: Mini Rpg 2005-12-16 21:49:47


Looks like you stole it because

1. You never explained what to do with the gotoAndPlays

2. The numbers seemed odd in the gotoAndPlays

3. In the example you never did anything with the gotoAndPlays...

YOU STEALER!!!

Response to As: Mini Rpg 2005-12-16 21:54:09


At 12/16/05 09:49 PM, BobRicci wrote: Looks like you stole it because

1. You never explained what to do with the gotoAndPlays

2. The numbers seemed odd in the gotoAndPlays

3. In the example you never did anything with the gotoAndPlays...

YOU STEALER!!!

wtf how and why would i steel this its basic movement and onClipEvents and stuff like that im just explaining how to make a mini RPG

Response to As: Mini Rpg 2005-12-16 21:58:21


At 12/16/05 09:54 PM, Christmas_Khao wrote:
At 12/16/05 09:44 PM, xfeelsobrokenlx wrote: thats pretty good man
If xfeelsobrokenlx tell you it's good, then it sucks...
really this tut is stolen firstly because you're totally new here, we don't know you and you don't explain anything!

Now get off the internet, it's not for you

ok now you guys are making me mad

First im diffenley not new here
and ive been doing flash for quite a long time at least a year i got a new sn because my house got destroyed in the tornado in indiana and i couldnt get on the computer for like 2 months and i couldnt remember my password and i never went to my email

Response to As: Mini Rpg 2005-12-16 21:59:02


At 12/16/05 09:49 PM, BobRicci wrote: Looks like you stole it because
YOU STEALER!!!

im inclined to agree. there are so many unexplained parts of this code, that im quite certain you dont know much about it. it seems like something you picked up. i mean, your code SEEMS to provide for different images for seperate directions of movement, but it certainly doesnt show that in the example.


BBS Signature

Response to As: Mini Rpg 2005-12-16 21:59:51


At 12/16/05 09:54 PM, xflashmanx0 wrote:
wtf how and why would i steel this its basic movement and onClipEvents and stuff like that im just explaining how to make a mini RPG

if you didn't copy and paste... why did you put the gotoAndPlays???

You stole it...

Response to As: Mini Rpg 2005-12-16 22:00:28


First off, the gotoAndPlays aren't used... for "whatever" reason..

You should use either a while loop, or shapeflag for the hitTests...

such as turning off the x or y movement when a collision occurs and then doing

while(this.hitTest(_root.thinggy && this._x < _root.thinggy)){control = false; this._x--}

Then.. for whatever reason, you had the game running at 12fps on your site. I think you stole it, like the dude above me.

Response to As: Mini Rpg 2005-12-16 22:02:40


At 12/16/05 10:00 PM, Johnny_Krysys wrote: First off, the gotoAndPlays aren't used... for "whatever" reason..

You should use either a while loop, or shapeflag for the hitTests...

such as turning off the x or y movement when a collision occurs and then doing

while(this.hitTest(_root.thinggy && this._x < _root.thinggy)){control = false; this._x--}

Then.. for whatever reason, you had the game running at 12fps on your site. I think you stole it, like the dude above me.

well im showing my idea what i picked up over the monthes and this is what i use in most of my rpg games

Response to As: Mini Rpg 2005-12-16 22:04:41


Quick quiz for you..

what does "ms" stand for in your code, and what does it do?

Response to As: Mini Rpg 2005-12-16 22:05:33


i copy and pasted from my games but i didnt steel them and how can you steel action script how? how? how?

Response to As: Mini Rpg 2005-12-16 22:06:56


You wrote it, right? What does "ms" stand for and what does it do?

Also, SPACEBAR is listed in the code, what is supposed to happen when you hit that?

Response to As: Mini Rpg 2005-12-16 22:11:57


I bet ya he downloaded Flsah Decompiler and just took the AS off of STick RPG casue that game uses the same coding as waht he pout do wn lol And i know just becasue i know

RPG'S KickAss Once im done playing them

Response to As: Mini Rpg 2005-12-16 22:19:20


Yeah, he's a cut/paster...

Look at his BBS posts...

At 12/15/05 04:50 PM, Flash_kid wrote: just change the movement script to this;
if(Key.isDown(Key.LEFT)){
_root.background._x-=speed
gotoAndStop("walkingframe")
_xscale=100}
if(Key.isDown(Key.RIGHT)){
_root.background._x+=speed
gotoAndStop("walkingframe")
_xscale=-100}
then instead of the person moving, the background does.

"i dont understand that is there a tutorial on this?"
on 12/16

and

"ok ive been through like ten tutorials!! for colisions and rpg and i cant find what im looking for so please and one show me a really good tutorial for rpg game"

on 12/15

Good try man. Better luck next time.

Response to As: Mini Rpg 2005-12-16 22:21:14


lol once im done wiht my rpg i guess i coukld make a tut on how to make colisions and all that eaisly with out that much of a hassle but it will be about sometime in febuary lol im still looking for a drawer

Response to As: Mini Rpg 2005-12-16 22:28:24


At 12/16/05 10:04 PM, Johnny_Krysys wrote: Quick quiz for you..

what does "ms" stand for in your code, and what does it do?

sorry my 4 replies per 30 minutes came
but
ms is a short for "movespeed" and if you dont like ms then here

onClipEvent(load){
speed=10;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y-=speed;
}
if(Key.isDown(Key.DOWN)){
_y+=speed;
}
if(Key.isDown(Key.LEFT)){
_x-=speed;
}
if(Key.isDown(Key.RIGHT)){
_x+=speed;
}
}

Response to As: Mini Rpg 2005-12-16 22:40:29


At 12/16/05 10:28 PM, xflashmanx0 wrote:
At 12/16/05 10:04 PM, Johnny_Krysys wrote:
onClipEvent(load){
speed=10;
}
onClipEvent(enterFrame){
if(Key.isDown(Key.UP)){
_y-=speed;
}
if(Key.isDown(Key.DOWN)){
_y+=speed;
}
if(Key.isDown(Key.LEFT)){
_x-=speed;
}
if(Key.isDown(Key.RIGHT)){
_x+=speed;
}
}

Total newb stolen from denvishes basic movment Tut

Response to As: Mini Rpg 2005-12-16 22:44:47


Not gonna waste any more time saying he's a fraud. The proof is there in his posts, and in the code. Going to get some coffee.

Response to As: Mini Rpg 2005-12-17 03:30:37


At 12/16/05 10:45 PM, pyro111 wrote: xflashmanx0= pwned
xflashmanx0= n00b
xflashmanx0= no knowledge of AS what so ever
xflashmanx0= steals from tutorials

that = soo true

Response to As: Mini Rpg 2005-12-17 03:32:17


At 12/16/05 10:40 PM, ElementalFlash wrote: Total newb stolen from denvishes basic movment Tut

It's a very basic code. Everyone's seen it before.

he could've gotten it from anywhere. lol.

I used to be relevant.

Response to As: Mini Rpg 2005-12-17 15:20:32


At 12/16/05 10:45 PM, pyro111 wrote: xflashmanx0= pwned
xflashmanx0= n00b
xflashmanx0= no knowledge of AS what so ever
xflashmanx0= steals from tutorials

HAhahaha... Syntax error...

Don't you mean:

xflashmanx0= "pwned" + "n00b" + "no knowledge of AS what so ever" + "steals from tutorials"

Response to As: Mini Rpg 2005-12-17 15:24:01


At 12/17/05 03:20 PM, BobRicci wrote: HAhahaha... Syntax error...

Don't you mean:

xflashmanx0= "pwned" + "n00b" + "no knowledge of AS what so ever" + "steals from tutorials"

Don't you mean...

trace("BobRicci is an idiot"); ?


wat

Response to As: Mini Rpg 2005-12-17 15:26:23


At 12/17/05 03:20 PM, BobRicci wrote:
At 12/16/05 10:45 PM, pyro111 wrote: xflashmanx0= pwned
xflashmanx0= n00b
xflashmanx0= no knowledge of AS what so ever
xflashmanx0= steals from tutorials
HAhahaha... Syntax error...

Don't you mean:

xflashmanx0= "pwned" + "n00b" + "no knowledge of AS what so ever" + "steals from tutorials"

I dont think he was trying to write AS there but if he was then you would be right.

Response to As: Mini Rpg 2005-12-17 15:42:04


At 12/17/05 03:24 PM, -Thomas wrote: trace("BobRicci is an idiot"); ?

that was just uncalled for. this is probly gonna turn into a flame thread between bob and everyone else now beacues of that

but seriously dude you stole that. you asked how to make an rpg just a few days ago. you didnt understand basic scripts and you gave us a script that you said you didnt know. your fucken retarded.

Response to As: Mini Rpg 2005-12-17 15:44:35


At 12/17/05 03:24 PM, -Thomas wrote:
Don't you mean...

Maybe... just maybe... *evil laugh*

Response to As: Mini Rpg 2005-12-19 00:36:23


At 12/17/05 03:27 PM, SpamBurger wrote: Ha ha! This n00b stole the code from me! I had it in my circle RPG game. I dont know how he got a hold of it. If anyone wants proof, AIM me or something and Ill send you the .fla of my game.

Ummm lol if your just handing out yor game that might be how he got it lol

Response to As: Mini Rpg 2005-12-19 01:15:59


Nice tutorial, I can't work out if your cheating or not... Im doing some investigation but I've found no proff yet..


Your path is dark.

Response to As: Mini Rpg 2005-12-19 01:20:35


At 12/19/05 01:15 AM, FlashKid wrote: Nice tutorial, I can't work out if your cheating or not... Im doing some investigation but I've found no proff yet..

i checked through his post's and a few day's back he was asking for a script alot like this. and as spamburger said he stole it from his rpg game.


========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

Response to As: Mini Rpg 2005-12-19 04:58:05


Yeah, I did the same FK... it seems like the day before posting this, he was asking how to create the same effect.

Response to As: Mini Rpg 2005-12-19 12:36:43


shortened :P
on character:

onClipEvent(enterFrame){
_x += (Key.isDown(Key.RIGHT) - Key.isDown(Key.LEFT))*10;
_y += (Key.isDown(Key.DOWN) - Key.isDown(Key.UP))*10;
Key.isDown(Key.UP) ? gotoAndPlay(21) : Key.isDown(Key.DOWN) ? gotoAndPlay(23) : 0
Key.isDown(Key.LEFT) ? gotoAndPlay(24) : Key.isDown(Key.RIGHT) ? gotoAndPlay(22) : 0
Key.isDown(Key.SPACE) ? gotoAndPlay(2) : 0
_y > 400 ? _y = 400 : _y < 0 ? _y = 0 : 0
_x > 550 ? _x = 550 : _x < 0 ? _x = 0 : 0
}

on "rectangle":

onClipEvent(enterFrame){
hitTest(_root.hero) && _root.hero._y < _y ? _root.hero._y -= 10 : hitTest(_root.hero) && _root.hero._y > _y ? _root.hero._y += 10 : 0
hitTest(_root.hero) && _root.hero._x < _x ? _root.hero._x -= 10 : hitTest(_root.hero) && _root.hero._x > _x ? _root.hero._x += 10 : 0
}

I just had to :P


BBS Signature