Totally Screwed up! =(

heya =(

i totally screwed up with my “rpg” project i would like to ask if theres anyone that could take a look at it and maybe fix it a little

if u would i’dd love it :smiley:

what i tried was:

  • Inventory system
  • health system on monster and player (when 0 play frame of died)
  • battle system (if click on a weapon see frame of u with weapon, if weapon touch monster get the damage)
  • weapon system (every weapon has own damage _root.weapon1 ect ect and random 10, 20 , 30 ect)

and final a kind of “teleport system” if u touch a edge of the map u get to the other side of it

Srry file was to big so had to upload on rapidshare and ultrashare

**[FONT=Verdana][SIZE=2]http://www.ultrashare.de/f/3472/Beta_V_0.0.6.fla

[/SIZE][/FONT]**http://rapidshare.de/files/17289384/Beta_V_0.0.6.fla.html

if anyone can for me idd love that and ill give you credits for it
a pretty famous Dutch website is waiting on my "rpg"game so ull get credits for it then :slight_smile:

Thnx,

Regards,
Ricer

If you don’t mind I’d like to use some of your code with my game, if it works out. I’ll try and fix it either way though.

Well for the ‘teleport’ system, I found that to be the easiest part of fixing it. It’s just:

if (this._x > 0 + this.width)
{
this._x = StageWidth-this.width;
}

and then do that 4 times but change it for each side.

Now for the other parts…

Ah, ok. So death… Ah I love that word ‘Death’. :cowbell:

if (_root.health > 0)
{
this.gotoAndPlay(Frame number that is death);
}

Now onto the next thing…

sure go ahead :slight_smile:

if u can fix my “mess” idd love you then! :smiley:

^^

Srry. I’m into that stuff man, I’m straight as a pencil. lol. :diss:

Ok so. :

for ascii code go here: it’s in Dec not http://www.danbbs.dk/~erikoest/asciicc.htm

if (Key.isDown(49))
{
for (i = 4;i > 5; i++)

For each slot in the inventory check what’s in there
I don’t know where you store the data of what’s in which slot. And if you don’t have that data stored you should store it in an array. Look it up, after lunch I’ll be glad to explain it if you havn’t already figured it out.
//Now check if there is a sword in one of these slots. If so then remove the item from the slot and then do this:
this.gotoAndPlay(frame with sword);
}

do that until all the weapons have thier own keys.

i got that,

but if i do the moving_mc will walk but the sword stays on the ground :stuck_out_tongue:

Right, what you might want to do is make it so when the character moves you make the weapon move too. So:

currentweapon = whatever weapon you are now wielding
currentweapon._y = moving_mc._y + 5;
currentweapon._x = moving_mc._x - 10;
if (key.isDown(Key.DOWN))
{
moving_mc._y += 5;
currentweapon._y += 5;
}

I’ll try doing the weapons.

function InitializeWeapons()
{
Sword.minDamage = math.Random(10);
Sword.maxDamage = math.Random(20);
Pike.minDamage = math.Random(20);
Pike.maxDamage = math.Random(30);
}

and so on and so forth, just make the min and maxdamage variables inside the IntializeWeapons.

As for the hitting:

if (Key.isDown(Key.SPACE) && Wielding == true)
{
if (curentweapon == sword)
{
this.gotoAndPlay(whatever frame is attack)
if (_root.moving_mc.sword.hitTest(Baddy))
{
Baddy.health -= 10;
}
}
}

Edit: After playing the game again there’s something wierd going on when you die. After you hit -1 your Status becomes healing and you go up to 5 health and then when you restart you go back down to -1 or 0 or 1

oh lol :S well thats probbly one of the “messed” things :stuck_out_tongue:

thnx for telling :slight_smile:

and thnx for the script ill give it a try

i fixed a little for u :slight_smile:

 currentweapon = whatever weapon you are now wielding
 currentweapon._y = moving_mc._y + 5;
 currentweapon._x = moving_mc._x - 10;
 if (key.isDown(Key.DOWN))
 {
 moving_mc._y += 5;
 currentweapon._y += 5;
 }

change into

onClipEvent (load) {
    currentweapon = _root.sword;
    currentweapon._y = moving_mc._y+5;
    currentweapon._x = moving_mc._x-10;
    if (key.isDown(Key.DOWN)) {
        moving_mc._y += 5;
        currentweapon._y += 5;
    }
}