help with top down fighter

Get help using Construct 2

Post » Wed Jul 03, 2013 4:22 pm

i am trying to make a top down fighter game based on anime one piece.

in the game player is going to fight enemies and will have also allies who will help in the war game.

game is similar to this game

http://www.kongregate.com/games/freegames1234/one-piece-gallant-fighter


the problem i am facing are

how should the attack take place i can't simple subtract health on collision between enemy and player.




this capx so far
https://dl.dropboxusercontent.com/u/187563770/one%20piece.capx
B
8
Posts: 10
Reputation: 382

Post » Wed Jul 03, 2013 5:24 pm

Okay this is what I did and it seems to work okay. The punch subtract 5 from the enemy.
Here are the events
luffy>Is overlapping marinesword
luffy>Is animation "punch" playing
System> Trigger once

The actions:
marinesword> Subtract 5 health
marinesword> Set animation to "hit" (play from beginning)

I hope this helps!
B
20
S
3
G
4
Posts: 23
Reputation: 3,354

Post » Wed Jul 03, 2013 6:27 pm

thanks orangemicro it really worked.

now the next problem is giving A.I to enemy.

what i did is i used turret and path finding behavior for enemy.

marineswordman on turret shoot-> marine swordman find path to luffy.x,luffy.y

marinewsordman on path found->marinesword move alog path
                             set animation attack

it didn't work

here is updated capx
https://dl.dropboxusercontent.com/u/187563770/one%20piece.capx
B
8
Posts: 10
Reputation: 382

Post » Thu Jul 04, 2013 5:54 pm

anyone help me
B
8
Posts: 10
Reputation: 382

Post » Thu Jul 04, 2013 6:02 pm

do instead of when he shoots. Everytick or every X seconds find path.
B
9
S
3
G
3
Posts: 70
Reputation: 1,990

Post » Thu Jul 04, 2013 7:09 pm

@mrpeanut

Go on , crash the game !
B
41
S
17
G
17
Posts: 2,247
Reputation: 17,436

Post » Thu Jul 04, 2013 7:13 pm

@Whiteclaws

Oh no you have seen through my evil sceme! Naah it coudl work for a few soldies on screen but it will give a bit of a performance fall when there are more than 20 marine soldiers. Did not test that.
B
9
S
3
G
3
Posts: 70
Reputation: 1,990

Post » Thu Jul 04, 2013 7:21 pm

If you want the enemies to follow a target until there destroyed try using turret & bullet behavior combined, altho you will have to set it up correctly for the speed and direction change to be realistic 'ie on the propertys tab'
also if you dont want the ai to follow the player add a few exceptions like 'if out of range by X then set different path'
B
4
S
1
Posts: 51
Reputation: 502

Post » Fri Jul 05, 2013 5:37 am

AI is one of the tougher things to do I think. I would just start out with one behavior like bullet and play with that, the space shooter is a decent example for that. You will have to customize of course. There are other ways to do things like the other people said.

Here is a link for AI in the forums: http://www.scirra.com/forum/topic54735_post342167.html

Also, http://www.scirra.com/forum/topic45416.html is a very good place to find sample projects.
B
20
S
3
G
4
Posts: 23
Reputation: 3,354


Return to How do I....?

Who is online

Users browsing this forum: marcoscodas and 14 guests