Help with rpg game

well I want to make a game in flash and I got codes for movement and hittest with buildings and stuff.
I have some problems with other scripts I need to figure out.
the game soppused to be scripted like zelda basiclly( character moves around, talk to people and attack with a sword)
but I want it to be with gta-style gameplay ( when you talk to people they give you missions).
I asked some forums on how to do that stuff but they keep ignoring or just post stupid replys…
so if you want to help me, here is what I need you to help me with:

  • attacking- shooting , sword or melee
  • scrolling (smooth scrolling or screen transitions)
  • inventory(with getting and giving items on inventory)
  • process of talking someone (how to use triggers?)

Well talking is simple just make dynamic textbox with the var name message on a movie clip labeled talk.Then the code

onClipEvent (load) {
timer = false;//timer is off
c=0;

}
onClipEvent (enterFrame) {
_root.f = c;
if (this.hitTest(_root.hero)) {

	_root.talk._visible=1;
	_root.talk.message = "Hi.";
	c = 0;
	timer = true;
}
if (timer == true) {//start timer
	c++;
}
if (c>=5) {//timer clicks 50 times
	_root.talk._visible=0;
	c = 0;
	timer = false;
}

}

Then just label your character hero.

Maybe you should try this thread:

http://www.kirupaforum.com/forums/showthread.php?t=54066&page=1

thnx, but how can I make my character attack (with animation changing)?
I know It’s something like
"if (Key.isDown(Key.SPACE)) {"…gotoandplay…
but I don’t know how to do the hittest stuff with stuff like sword attack or gun shot…

It’s this:


if (Key.isDown(Key.SPACE)) {
	hero.gotoAndStop("slash_animation");
	hero.slash_animation.play(1);
	}
}

as for the sword hitting, inside of 'is animation, make the sword into a movieClip and give it an instance name of “sword”. Then program the heros actions to say:


if (hero.slash_sequence.sword.hitTest(badGuy)) {
	badGuy.gotoAndStop("die_animation");
	}
}

Hey! I was going to help!

peace

thanx all of you!
I really appreciate this!

I have some problems with the animation code…
can you give me some detail on how to do it right?

Well, here is something to help you:

how can I get him to stop attacking?
I want him to attack once in every key press, and not continue to attack without stopping…
I tried to put “stop()”, write “gotoandstop” but it just made that worse.

well in your sword or punch MC at end just type

punching=false
gotoAndStop(1);

Yeah, then in an onClipEvent(keyUp), type punching = true;.

joMan - hehe, I like your punch fla. Nice simple animation :¬)