How do I set family variable to different values

Get help using Construct 2

Post » Wed Jun 25, 2014 5:08 am

I think I asked this wrong in beginners,

How do I a set a family variable to different values for some members?
B
8
S
2
G
2
Posts: 34
Reputation: 1,707

Post » Wed Jun 25, 2014 5:22 am

Pick the member object.
Set the variable.

Edit: I have updated my example from the other forum where you asked this. Let me know if it helps.

timer.capx
You do not have the required permissions to view the files attached to this post.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jun 25, 2014 5:36 am

I am not sure how to pick the specific member, that's the part I am very confused on.

I tried to to set in 'on create' but it stays global for all

example:

enemy1 on create ---> set Family Variable HP to 5

as soon as any enemy1 loses 5 HP they all blow up

I know I have to solve this before I go any further, to have enemy1, enemy2, ect to have all different HP.

Or is this something Families can't do, and I will have to set up Hit Points and collision events for each enemy type?
B
8
S
2
G
2
Posts: 34
Reputation: 1,707

Post » Wed Jun 25, 2014 5:44 am

Check the capx... I picked the object by mouse right-click but you could give them a unique number (other than the UID) or a name, etc. As you can see the individual HP variable for each object is changing separately. Go to the layout and set HP of each instance in the editor.. it will still work.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Wed Jun 25, 2014 6:54 am

OK I was looking at the wrong project, the family .capx in other post was just what I needed to get going. Now I'm going breakdown so I fully understand each part.

This has had me stumped for 8 hours (im slow i guess :oops: )

Thanks!!!! :D :D :D :D :D :D :D
B
8
S
2
G
2
Posts: 34
Reputation: 1,707


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests