How do I make instances act separately

Just started using Construct 2? Post your questions here

Post » Thu Jun 19, 2014 3:12 pm

Hi guys! I have the next situation:
I have 5 enemies, and for economic purposes I unied them into the family "enemies" and it works good.
But if I have more than 1 instance, I found that they act as a whole (for example I have fight with object wolf in the family, and object bear does all what wolf does (takes damage, etc).

How can I do that they will act separately what was written for the family? I saw pick section in system, but don't understand how to use it in my situation
B
7
S
1
Posts: 73
Reputation: 603

Post » Fri Jun 20, 2014 1:35 am

Assign a variable to the instances with unique values and then act upon that variable .
What I know would fill a Book , what I don't know would fill a Library
B
37
S
12
G
29
Posts: 331
Reputation: 16,499


Post » Fri Jun 20, 2014 12:00 pm

I mean if I use method on screen it works how I want and when I place enemies on the layout, if they see a hero they act as a separate object, not as a whole. But the question is, is it efficient for optimisation or it is not quite good?
You do not have the required permissions to view the files attached to this post.
B
7
S
1
Posts: 73
Reputation: 603

Post » Fri Jun 20, 2014 1:37 pm

Assuming the enemies don't move if x=X, then this is OK. You don't need to set the speed constantly since it doesn't change between the two cases.
ImageImageImage
B
71
S
21
G
230
Posts: 3,688
Reputation: 128,847


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests