Board Game

Get help using Construct 2

Post » Tue Nov 12, 2013 8:53 am

Hi
I'm very new to Construct 2 (but not to programming) and am trying to write a simple board game which is a bit like Tic-Tac-Toe. I have created a background and 9 "spots" on the next layer which are individual cells. I was wondering how to create an event whereby if I click on one of the 9 cells, a counter appears upon that one only? So far if I click on a cell, a counter appears on all nine! I just can't work out how to write an event which references one particular sprite!

Thanks
Matthew
B
12
S
3
Posts: 37
Reputation: 1,111

Post » Tue Nov 12, 2013 9:51 am



9 different sprites or different instances ?

Normally you just do something like:
+ On touch cell //Creates automatically a reference to the touched cell, this reference is available in every action and condition below of it
-- cell spawn counter

If you have different sprites put them into a family

B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Tue Nov 12, 2013 10:01 am

Hi
I used the duplicate sprite feature (holding ctrl to copy more) - are they instances or sprites?

Thanks
B
12
S
3
Posts: 37
Reputation: 1,111

Post » Tue Nov 12, 2013 10:03 am

They are different sprites, instead of duplicating them you should just copy them.

Just click on them in the editor and press strg(ctrl) + c and strg(ctrl) + v.

If you do it like you, you would need to put them into a family. If not you need for every object another event.
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Tue Nov 12, 2013 10:16 am

Thanks that's great - I'll test it out tonight.
B
12
S
3
Posts: 37
Reputation: 1,111

Post » Tue Nov 12, 2013 1:15 pm

It will help you too: https://www.scirra.com/tutorials/361/understanding-uid-iid-health-cards-and-rocket-smoke-trail
Image
B
108
S
24
G
18
Posts: 1,373
Reputation: 22,824

Post » Tue Nov 12, 2013 3:45 pm

Thanks, I'm just wondering at the moment whether to make my "spots" (where the counters land) to be instances or a family and how to reference them all within events - such as movement.
B
12
S
3
Posts: 37
Reputation: 1,111


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 27 guests