How do I work with families properly

0 favourites
  • 2 posts
From the Asset Store
_______ Huge collection of metal fixtures ________
  • Hello,

    Im trying to get my Real time strategy kind of game working, but im Stuck at the attack part.

    in general:

    I have a family called MOVABLE, and it contains various variables like Speed, Faction, Health

    I'm Planning to have more subclasses as sprites that will determine if the unit is a archer / soldier / mage / 3headed Unicorn.. whatsoever

    Here is where im Stuck:

    When a unit from the movable family is in range of another unit from the moveable family with another faction it should automaticle initiate the attack by setting a target position into the Enemy (just coordinates).

    The thing is when i write :


    i cant figure out how to distinguish between the two units and read out the faction of the other movable :O

    i hope you guys understand my problem and can help me to find a way to fix it.

    love Partyfriend

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could use a second family with the same objects in it. Then you have two unique objects to work with.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)