# The basics of an RPG (role-playing game)

**URL:** https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967
**Category:** programming
**Created:** [April 18, 2004, 8:06pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967 "2004-04-18T20:06:08Z")
**Posts on this page:** 14
**Page:** 2

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 29, 2004, 9:30pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/21 "2004-08-29T21:30:38Z")

</div>

ur looking at it ^.^

Just go to the tutorial section.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 10, 2004, 8:10am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/22 "2004-09-10T08:10:11Z")

</div>

I find that a tute with a fla is a lot better than a tute without, just because if you don’t understand a step at least you will have a working fla and you can trace back a few steps to see what it is ur actually supposed to do, btw fantastic tute though

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 29, 2004, 6:23pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/23 "2004-09-29T18:23:35Z")

</div>

Ok guys im a newb to actionscript (please don’t get mad if i don’t understand). Do you create a frame where you make a character, make him sway his arms and legs when he moves and save it as a movie clip?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 1, 2004, 5:48pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/24 "2004-10-01T17:48:31Z")

</div>

But how i put buildings?  
It still walks from everytihing(everything)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 1, 2004, 5:50pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/25 "2004-10-01T17:50:25Z")

</div>

Yes.  
And then right-click it and select actions.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 1, 2004, 5:57pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/26 "2004-10-01T17:57:11Z")

</div>

it walks still throught buildings. how can i made buildings from buildings?  
Other question is where i put those buttons (goto class(buy beer)  
is there something movie clip or just frame

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 2, 2004, 12:02am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/27 "2004-10-02T00:02:45Z")

</div>

I animated my guy to walk forward and sway his arms, but when i test it, he doesn’t sway.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [October 3, 2004, 10:58am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/28 "2004-10-03T10:58:31Z")

</div>

hey lucas92 you dont need any actionscript to make the guy stop his animation when you let go of the key, i thought of trying something and it worked! i edited the mans symbol, making it that on the first frame of his animation, i put stop();  
on the first frame of his animation, apart from that, this tutorial is really bloody awesome, thanks denacioust!

---

<div class="post-metadata">

### Author: ![cobrasniper555](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cobrasniper555](https://forum.kirupa.com/u/cobrasniper555)
#### Post date: [April 16, 2006, 2:39am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/29 "2006-04-16T02:39:58Z")

</div>

Ok guys…for all of the people that have hitTesting problems! You want to test where your character is **going** to be, not where he is. The easiest way to do so is by a function. So put this in:

```auto
function walkTo(X:Number, Y:Number):Void{
if(!_root.buildings.hitTest(_x+X,_y+Y,true)){
_x += X;
_y += Y;
}
}

```

And replace that function for the script you use to move your guy. For example:

```auto
if(Key.isDown(37)){//Don't use this
_x -= 5;
}

```

…But use this:

```auto
 if(Key.isDown(37)){//Use this
walkTo(-5,0);
}

```

It’s what I use, it’s what I’ve been using, and it’s what I will always use. It’s the best code there is. You can figure out another code, but try to detect where the guy **will** be, not where he is!

---

<div class="post-metadata">

### Author: ![cobrasniper555](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cobrasniper555](https://forum.kirupa.com/u/cobrasniper555)
#### Post date: [April 16, 2006, 2:41am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/30 "2006-04-16T02:41:10Z")

</div>

OH…and put all the buildings into one MovieClip…if you use my method.

---

<div class="post-metadata">

### Author: ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)
#### Post date: [April 16, 2006, 10:36pm UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/31 "2006-04-16T22:36:51Z")

</div>

[http://www.n99creations.com/?pID=archives&col=Blue&arch=getBounds\_as\_walls](http://www.n99creations.com/?pID=archives&col=Blue&arch=getBounds_as_walls)

😉

---

<div class="post-metadata">

### Author: ![signifer123](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@signifer123](https://forum.kirupa.com/u/signifer123)
#### Post date: [April 20, 2006, 12:50am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/32 "2006-04-20T00:50:10Z")

</div>

denacioust, if your here still, could you refurbish the tut to use all this code?  
if not anyone else up to it?

---

<div class="post-metadata">

### Author: ![cobrasniper555](https://avatars.discourse-cdn.com/v4/letter/c/838e76/32.png) [@cobrasniper555](https://forum.kirupa.com/u/cobrasniper555)
#### Post date: [April 20, 2006, 3:51am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/33 "2006-04-20T03:51:36Z")

</div>

> [@signifer123](#):
>
> denacioust, if your here still, could you refurbish the tut to use all this code?  
> if not anyone else up to it?

I’d love to…I have made TONS of RPGs, mostly art-based, so artists out there can use their art to an advantage. Problem is, it might take me a little while because of school and stuff…plus I got summer school. I’ll do it if denacioust wouldn’t like to…

---

<div class="post-metadata">

### Author: ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)
#### Post date: [April 20, 2006, 5:56am UTC](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967/34 "2006-04-20T05:56:14Z")

</div>

I am contemplating writing my own rpg tut soon 😃 (next holidays)

[Previous page](https://forum.kirupa.com/t/the-basics-of-an-rpg-role-playing-game/48967.md?page=1)
