How do I inherit Family variables to a bullet outside

Get help using Construct 2

Post » Wed Mar 23, 2016 10:21 pm

Hi guys.

I usually fiddle around when I find a problem, but this time I'm kinda confused.

I have the following situation:
- Inside Family1 is a Monster1 which uses the turret behaviour
- Monster1 has inherited variables with life, damage_min and damage_max (which are not used in the screenshot)
- The arrow which is getting spawned is not part of the Family1 (because of a lot behaviours, it cannot be)
- The Monster2 from Family2 is getting fixed damage of 20

Now everything works fine, I shoot, Monster2 from Family2 is getting 20 damage every shot and dies.

My Problem is, I don't want the fixed damage of 20, but the instanced variables from Monster1 of the Family1 damage_min and damage_max.
Usually I do this with a Function and add a parameter like the Monster1.UID, but the arrow is doing the damage not Family1/Monster1...

Any idea how I could inherit the variables from Monster1, without adding the arrow to the Family1?

EDIT: Ok never mind, I'm stupid (kinda late here...)
I just had to add a variable to arrow and on spawn give it the value of Monster1 damage_min and damage_max.
Works perfectly.
Posts: 13
Reputation: 283

Return to How do I....?

Who is online

Users browsing this forum: Elliott and 6 guests