how to Copy objects with instance variables unique?

Just started using Construct 2? Post your questions here

Post » Thu Jul 09, 2015 12:09 am

Hello, first I want to apologize for the English mistakes, I am Brazilian and I'm using google translator.
Ok, come on, I have an object called "soldier" and he has an instance variable called "state" type number, I did an event to buy the distance from the soldier to the enemy when he is near, the variable state is set to 1, and did an event for the state = 1, the soldier stops walking. But when I create more objects soldier when the first stops walking, everyone stops. I want to make each need to be in the distance I determined.
I'll post the project to be easier to understand


https: //www.dropbox.com/s/pbtdbd7x9jyiirp/projeto.capx?dl=0
B
6
S
1
Posts: 29
Reputation: 465

Post » Thu Jul 09, 2015 5:24 am

Sounds like you need to put your events under a "for each soldier"
Who dares wins
B
57
S
17
G
21
Posts: 1,878
Reputation: 19,592

Post » Thu Jul 09, 2015 2:06 pm

I tried to do that too, but then the first soldier stopped when he got the right distance from the enemy, but the second went straight .
B
6
S
1
Posts: 29
Reputation: 465

Post » Thu Jul 09, 2015 2:13 pm

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 » Thu Jul 09, 2015 2:48 pm

Thus, only a soldier attack at a time.
B
6
S
1
Posts: 29
Reputation: 465


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests