Stencyl 3.4.0 is now out. Get it now!

Made Real Time Battle System for Top Down Game RPG

LadyLegend

  • Posts: 112
<a href="https://static.wixstatic.com/media/f687c2_f4ee05827b7c4024831232e22aa4b202.swf" target="_blank" class="new_win">https://static.wixstatic.com/media/f687c2_f4ee05827b7c4024831232e22aa4b202.swf</a>

Z is the action button
X is Attack
Space is Switch weapon
shoot the fence with the apple
get the onion out of the chest
put the onion on the rock to get the sword
cut the bush and then your done

« Last Edit: February 04, 2017, 05:04:30 pm by LadyLegend »

rob1221

  • *
  • Posts: 9029
What's the embed code you're using?

LadyLegend

  • Posts: 112
this one from here

(flash=200,200][/flash)

I removed the brackets to display it

rob1221

  • *
  • Posts: 9029
Code: [Select]
[flash=640,480]https://static.wixstatic.com/media/f687c2_f4ee05827b7c4024831232e22aa4b202.swf[/flash]

LadyLegend

  • Posts: 112

ceosol

  • *
  • Posts: 2091
For a real time battle system, you should allow attacking and moving to happen simultaneously. It is a good start, but this should really be in journals instead of shared resources. Unless, are you going to attach your .stencyl file for other people to download?

LadyLegend

  • Posts: 112
Real time battle systems are like zelda or not turn based battles like pokemon or FF. If I add it once you attack while your moving I would still stop the player movements once the attack button was pressed. If the player is allowed to move while attacking the sword for example would still be extended one way when the the player decides to run in a different direction and attack there. Even if the sword changes side with the player. The player would start an attack in one direction and then turn another direction the sword would be facing the wrong direction even though it is on the right side of the player. So a stop is necessary before or after attack allowing movement to continue after the sword swipe. Believe me I tried it and it was too much of a hassle when I am ready to share the code by all means edit it to your hearts content.

I didn't know that this should be in journal do I repost it there?

ceosol

  • *
  • Posts: 2091
I did this a couple of years ago: http://www.stencyl.com/game/play/29776. I do not see any issues with attacking and moving at the same time. Press arrow keys to move and Space to attack.

If you absolutely want the attacking to only occur when stopped, then force a stop when attack is pressed. Have an attacking boolean that turns to true and only allow movement if attacking = false.

LadyLegend

  • Posts: 112
I do have it attacking when stopped. I am going to change it to when it attacks it stops movement. I checked out your link and it is smooth because it is just a line popping up there is no animation to the sword. I got it to work like that but decided against it cause it looks more like a poker than a sword swipe. Also it could just be me but I'd prefer not allowing the player to run into the enemy with the sword. At least not with a sword. maybe javelin.

« Last Edit: February 06, 2017, 07:46:39 am by LadyLegend »