Grouping objects

Get help using Construct 2

Post » Wed Nov 13, 2013 2:51 am

Hi,

I've got same types of objects in my game that I would like to call actions for in groups ( not to confuse with groups in the event sheet ). I figured I would create a variable "Group" and set it for example to 1 for some objects, then 2 for others etc and that it would be a good start. But then I have no idea how I should check for sprites with same group without using specific numbers. I would want to check if sprites have same variable value without specifying what value it is. Putting them in to families is not a possibility. Any ideas?

Thanksmegatronx2013-11-13 02:55:55
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Wed Nov 13, 2013 11:13 pm

Bump
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Thu Nov 14, 2013 9:32 pm

Bump
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099

Post » Fri Nov 15, 2013 12:44 am

Why don't you simply push the UIDs of the objects you want to group to an array? You could then iterate through them and call the necessary actions.
B
22
S
6
G
10
Posts: 1,036
Reputation: 7,518

Post » Fri Nov 15, 2013 1:31 am

How that would have to work?

Just a moment ago I've menage to separate groups and apply different sequential movements to them. But only problem I have is with Every Second condition - don't know how to pick up it per group and so it is applied from one object to all objects.



My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
89
S
30
G
22
Posts: 1,985
Reputation: 20,099


Return to How do I....?

Who is online

Users browsing this forum: dop2000 and 55 guests