[SOLVED]How do I use families depending on variables?

Get help using Construct 2

Post » Sun Feb 14, 2016 2:25 pm

Hello World,

I have a annoying little(yet very important) problem that would fix a bunch of issues in my project.
I need to use the family object to spawn some objects depending on that family's instance variable. To understand exactly what I'm talking about please download the archive below which contains an example capx and a video where I explain everything.

https://www.dropbox.com/s/r6pih3or3jog1 ... m.rar?dl=0

Thank you.
Last edited by VIKINGS on Mon Feb 15, 2016 8:04 pm, edited 1 time in total.
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Sun Feb 14, 2016 11:46 pm

I ran into 2 problems.

1/ Whatever condition; de create action (when used with a family) is totaly random.
Problem: you can't create an instance that meets the condition.

2/ The family variables for a newly created family-instance fall back to the values as set in the layout.
Problem: you can't make a condition to test the newly created instance on previous changed family variables.

I made a workaround. But i am not happy with it. It is no advertising for the use of families. Hope you understand my English.

https://
drive.google.com/file/d/0B1SSuCVV8v74aHRkT0FkNFhpcmc/view?usp=sharing
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Mon Feb 15, 2016 6:46 am

ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Mon Feb 15, 2016 2:26 pm

Thank you @blackhornet , seems to be exactly what I need. Unfortunately, just as I feared, since the solution is a bit more complicated I will be able to integrate it in every place except one. Funnily enough the place where it won't work in is your code too. ;)
So I've made a new video, and included the additional capx, please take a look and see if you can make it work in that scenario too?

https://www.dropbox.com/s/oy0m4hrvxs772 ... e.rar?dl=0

Thank you.

P.S. Thank you too @99Instances2Go for trying, but it seems blackhornet wins this one, again. :P
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Mon Feb 15, 2016 3:53 pm

What you've described should be no different than what was done with the Chosen=1 in event 8 of the Example file. You would just make sure you choose the number you care about, then only those will be picked.
ImageImageImage
B
71
S
21
G
232
Posts: 3,696
Reputation: 129,868

Post » Mon Feb 15, 2016 8:03 pm

Aha, so I change the event part, not the action part. Ok, I'll mess around with it some more. Thanks again very much @blackhornet .
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Thu Feb 18, 2016 11:54 pm

@blackhornet, you should include the last .capx (corrected) in the examples that go with the plugin. Its is a very good example. It convinced me to use the NickName Plugin. Thx 4 the implimentation @VIKINGS. Got my nose very deep in this, learned a lot.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: evillair, gamecorpstudio, jorgmaquoi and 21 guests