How do I change families for an object during runtime?

Get help using Construct 2

Post » Sun Apr 23, 2017 2:35 pm

Hi there,

I want an object to leave one family and join another when a value gets below a certain threshhold.

i.e.

IF enemy.valuex < 50
THEN Leave FamilyA and Join Family B.

Is this possible? Or am I going to have to use a system using Boolean values?

Cheers.
B
6
S
2
Posts: 81
Reputation: 666

Post » Sun Apr 23, 2017 2:41 pm

That's not how Families work. You'll need a different mechanism.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073

Post » Sun Apr 23, 2017 3:12 pm

Okay. Thanks. I'll use a system of booleans then.

Thought I'd get clarification. Families are like classes I suppose, and cant' be changed during runtime?
B
6
S
2
Posts: 81
Reputation: 666

Post » Sun Apr 23, 2017 3:37 pm

They are similar to classes. They can't be changed at runtime.
ImageImageImage
B
71
S
22
G
248
Posts: 3,761
Reputation: 138,073


Return to How do I....?

Who is online

Users browsing this forum: divsyntax and 21 guests