List of objects in-game

Get help using Construct 2

Post » Wed Nov 12, 2014 5:47 pm

I'm making turn-based strategy game. It has limit that you cannot just scroll to enemy's basement, you must send units there. This may sound as trivia but it is important to know.

So in the moment, if you click your own unit, game will scroll towards it. That is one way to select an unit. But there should also be another way to select units- i tough something like a list of unit objects in-game, and when you click any of them in list game scrolls to clicked one. But i have no idea how to do it.

Can you tell me how to do it or something like it?
~~~~Jabutosama
B
14
S
3
Posts: 68
Reputation: 1,439

Post » Thu Nov 13, 2014 11:59 pm

The objects in the list store the units uid or some instance variable, then when you click object in list pick unit object by that uid or instance var.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Sat Nov 15, 2014 11:16 am

Thank you. That helped me a lot, but can you tell also how to scroll to object X whose UID is same as selected?
~~~~Jabutosama
B
14
S
3
Posts: 68
Reputation: 1,439

Post » Sat Nov 15, 2014 12:52 pm

Maybe put ScrollTo behaviour on the object you want to scroll to.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests