How do I inherit Family variables to a bullet outside

0 favourites
  • 1 posts
From the Asset Store
Weather Sounds contains 132 sounds from them 64 seamless loops
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)