How do I do pathfinding animation for many monsters

Get help using Construct 2

Post » Fri Jan 15, 2016 9:57 am

I am doing a pathfinding behavior for my monsters where they move on their path to specific point. A monster has animation for down and right movement.

The problem is when the first monster change his movement animation form right to down, all other monsters switch to moving down animation, although they should have the right animation not down.
Screen shot of the code:
"https://drive.google.com/drive/folders/0B1pGW-xaP8VfMXVpRWZPZVo2Y0U"
B
7
Posts: 21
Reputation: 325

Post » Fri Jan 15, 2016 10:13 am

sounds like you set the animation for the object (monster) and not for the instance of the related monster.
Play free C2 games: http://www.gameus.de
B
32
S
18
G
13
Posts: 316
Reputation: 10,447

Post » Fri Jan 15, 2016 11:25 am

mercuryus wrote:sounds like you set the animation for the object (monster) and not for the instance of the related monster.


Sorry I am beginner, how could I set it to specific instance of the related monster
B
7
Posts: 21
Reputation: 325

Post » Fri Jan 15, 2016 2:59 pm

you need to use families for that -> which changes all instances, and since you don' have full C2 (according to badge) you can't do that.

other then that i'd put:

if monster.pathfinding.angle > 45 then monster.animate. walk down.

other then that walk left.
Sea Monsters template - Isometric
Also includes 40 pages PDF of optimizations and "how-to" for your games, and how the "sea monsters" template was built. Follow link for details :)

sea-monsters-templates-and-assets_t162705
B
39
S
14
G
12
Posts: 617
Reputation: 9,297

Post » Fri Jan 15, 2016 4:45 pm

so there is no any other way to separate each monster with his animation according to his direction of movement, without getting the full C2?
B
7
Posts: 21
Reputation: 325

Post » Fri Jan 15, 2016 7:36 pm

"System compare" doesn't pick an instance..

You have to tell C2 which instance of the monster you want to react to your action..

As explained in How events work

(see the part about "unrefrenced objects")
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jan 16, 2016 11:35 am

Thank you so much, cleared many concepts for me
B
7
Posts: 21
Reputation: 325


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests