[SOLVED]How do I make pathfinding for multiple enemies?

Get help using Construct 2

Post » Mon Jun 02, 2014 5:38 pm

Hello, great people of the internet..

I have a very strange problem, and considering that my resources are limited in Construct 2, since i am using the free version, not very surprising. (Sorry, but i'm too "cheap" to buy the full version ;) )

I am currently making a game for a school project, using the FREE version of the software.

And here i am using the awsome pathfinding feature, when all seemed to work fine for ONE of the SPRITES/Monster of the game, I attempted to make a copy of the same monster hoping they would MOVE IN DIFFERENT PATHS TO THE PLAYER. But it didn't turn out the way i hoped, and thus, i desperatly attempted to make a second Monster Sprite, with the same PathFinding events and actions as the previous one. But this one turns out to be the same, except when the second one works the first doesn't and moves in a parallel path to the other Monster Sprite.
And for random reasons, sometimes the monsters are ghosting around all over the map(through walls and so on).

I know that Using the families feature is more appropriate, but please consider that i am using the Free Version.

Please help me with the problems, using the resources provided in the free version of CONSTRUCT2!

So far, these are the major problem of the game right now. There are few others, but i think i can figure out the others.

Please HELP ME... :oops:

The following is the project for the Game;
SchoolNightMareV2.capx
You do not have the required permissions to view the files attached to this post.
Last edited by reizmoz on Wed Jun 04, 2014 9:50 pm, edited 1 time in total.
B
3
Posts: 4
Reputation: 183

Post » Tue Jun 03, 2014 9:23 am

Try this logic:

Condition: EveryTick
>ForEach (monster)
>PathFinding>status not equal (is moving)
>PathFinding>status not equal (is calculating path)
Action: Monster>PathFinding>FindPath(Player.X, Player.Y)

Condition: Monster>OnFoundWay
Action: Monster>PathFinding>MoveAlongPath
B
5
S
1
Posts: 22
Reputation: 421

Post » Tue Jun 03, 2014 6:52 pm

Thank you for the reply, but that did not work for me. (for some reason i cant find pathfinding as a condition...)

Although that does give me a idea, i tried out my idea.

I made 2 copies of the same monster, the skeleton?, so now there are two skeleton monster. Running around, each with a MonsterAnimation Sprite, but the thing now is that the monsters do move around on their own accord, JUST THE MONSTER SPRITE not the MonsterAnimation sprite.

The MonsterAnimation sprites are now moving in a parallel fashion, rather than to their respective Monster Sprite.

ANY FIX TO THIS?

To make the MonsterAnimation sprites to follow their own Monster Sprite?
Also it seems that the second copy doesn't chase after the Player?


This is the updated copy with my idea applied....
SchoolNightMareV2.capx
You do not have the required permissions to view the files attached to this post.
B
3
Posts: 4
Reputation: 183

Post » Tue Jun 03, 2014 7:27 pm

@reizmoz

Is this what you where trying to do? Press "9" to create another monster.
I'm no expert but I don't think that those for loops are working the way you want them to.

I always use the on created for new elements I put in the game.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 53
Reputation: 3,335

Post » Tue Jun 03, 2014 8:16 pm

@donelwero

Thank you for the reply, i'm kinda new to this software, so i don't know most of what's going on.

I see that you have taken out my For Each conditions, seeing that it has made no difference in the game itself.

Is it possible for you (or anyone else) to help me with the problem that:
1) The second monster somehow isn't really "chasing" the player when it sees it, like the first one.
2) The sprites aren't attached to their Monster sprite.
B
3
Posts: 4
Reputation: 183

Post » Wed Jun 04, 2014 6:19 pm

@reizmoz

Sorry, I've been kinda busy and didn't see your message until now. As I said, I'm no expert but, hope this is more like what you were trying to achieve.
You do not have the required permissions to view the files attached to this post.
B
21
S
5
G
3
Posts: 53
Reputation: 3,335

Post » Wed Jun 04, 2014 8:56 pm

@donelwero

Thank you for the help with this. :P

Yes, that is mostly what i wanted. :D

I guess this is a case closed. ;)
B
3
Posts: 4
Reputation: 183


Return to How do I....?

Who is online

Users browsing this forum: ivanski1983, KTML5 and 6 guests