Question about families and creating objects

Discussion and feedback on Construct 2

Post » Tue Oct 06, 2015 12:29 pm

Hi,

I have a question about creating objects and then triggernig On Created. Basically, if have different enemies, all in one family, if let's say I create enemy10 will then On Family Enemies created will work for that particular object? And what if I create number of different enemies at the same time? Thx
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 » Tue Oct 06, 2015 2:32 pm

megatronx wrote:Hi,

I have a question about creating objects and then triggernig On Created. Basically, if have different enemies, all in one family, if let's say I create enemy10 will then On Family Enemies created will work for that particular object? And what if I create number of different enemies at the same time? Thx


All objects that are part of the family will trigger both there object and family On created event. Since "On created" is a trigger it will trigger for each object so this shouldn't be a problem if you spawn more at the same time, as they will be handled individually.

The priority of triggering the "On created" is object first then family. So family settings will overwrite the object settings.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Oct 06, 2015 6:35 pm

nimos100 wrote:
megatronx wrote:Hi,

I have a question about creating objects and then triggernig On Created. Basically, if have different enemies, all in one family, if let's say I create enemy10 will then On Family Enemies created will work for that particular object? And what if I create number of different enemies at the same time? Thx


All objects that are part of the family will trigger both there object and family On created event. Since "On created" is a trigger it will trigger for each object so this shouldn't be a problem if you spawn more at the same time, as they will be handled individually.

The priority of triggering the "On created" is object first then family. So family settings will overwrite the object settings.


Thx!
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 Construct 2 General

Who is online

Users browsing this forum: JesusJ and 16 guests