Is it Possible to Short Z Order of 2 Different Objects?

Get help using Construct 2

Post » Thu Aug 10, 2017 10:46 pm

My English is not good so i will try to explain myself as good as i can.

I love making isometric games but there is always be a problem.Shorting z order.

In some of my projects , i put every elements into the one object family as frames.Then applied "short z order" action.

This system works but picking instances is so hard with it.

I want to know , is it possible to short z order of 2 different objects (not instances of same object) by Y axis?
B
23
S
11
G
1
Posts: 127
Reputation: 2,737

Post » Fri Aug 11, 2017 11:39 am

You can use the family only to sort Z order.

If there are many many objects, but the order can be constraint to ordering around a few 'key' objects, you can pre-pick those objects.

Example with order needed only around the player. (player is also in the family)

Give player the Line of Sight behaviour with a reasonable range.
Give the family a family instance variable 'ground'.

(Player) Has LOS on (family)
____For each (family)
_________Set family.ground to family.y
____Empty event
_________System > Sort Z order > Object = family ... Instance variable = 'ground'.

You can also pre-pick those that are on screen

Is on screen (family)
____For each (family)
_________Set family.ground to family.y
____Empty event
_________System > Sort Z order > Object = family ... Instance variable = 'ground'.
B
33
S
18
G
27
Posts: 2,444
Reputation: 20,352

Post » Fri Aug 11, 2017 12:21 pm

Good Morning.
Maybe if you use layers get better, in the coding can define which layer should overlap the others and the objects will overlap those of the other layers, this feature is used for creating RPG games, remembering that we have to observe points of collision.
B
14
S
9
G
15
Posts: 55
Reputation: 10,573

Post » Fri Aug 11, 2017 6:29 pm

@99Instances2Go Thank you!
B
23
S
11
G
1
Posts: 127
Reputation: 2,737

Post » Fri Aug 11, 2017 6:31 pm

@Huemerson

Do you mean more layers? I tought more layers can lower the fps.
B
23
S
11
G
1
Posts: 127
Reputation: 2,737

Post » Fri Aug 11, 2017 6:51 pm

I understand, but my games are created with multiple layers and I have no problems with the gameplay, of course I tested with minimal configuration (Samsung win2 duo -TV) ... and I'm not having problems.
B
14
S
9
G
15
Posts: 55
Reputation: 10,573


Return to How do I....?

Who is online

Users browsing this forum: totoe, wizdigitech and 15 guests