How do I work with families properly

Get help using Construct 2

Post » Sat Jan 07, 2017 9:11 pm

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 :

if MOVABLE has LOS of MOVABLE

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
B
4
Posts: 3
Reputation: 206

Post » Sat Jan 07, 2017 10:09 pm

You could use a second family with the same objects in it. Then you have two unique objects to work with.
ImageImageImage
B
71
S
21
G
221
Posts: 3,649
Reputation: 124,227


Return to How do I....?

Who is online

Users browsing this forum: bluesun66 and 10 guests