1 bullet = 2 objects?

For questions about using Classic.

Post » Mon Oct 06, 2008 6:47 pm

I'm performing object counts at present to test out a few things, but I noticed that when I spawn a bullet object, it counts as 2 objects.. is that what it's supposed to do?, if so, what's causing it?
B
4
S
2
G
5
Posts: 149
Reputation: 2,025

Post » Mon Oct 06, 2008 8:01 pm

i just tried it and i only have one object count per bullet... sure you don't have duplicate event?

edit: that was using Sprite.Count for the bullet -- it correctly counts 1 per bullet.

TotalObjects counts 2 per object (each bullet was 2, but the thing spawning bullets was also 2...)

weird
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Mon Oct 06, 2008 8:12 pm

hmm, I built a bare bones test, i'll rebuild it and upload it.
B
4
S
2
G
5
Posts: 149
Reputation: 2,025

Post » Mon Oct 06, 2008 8:14 pm

It's correct it counts as two objects: one object is the object itself, and the behavior counts as another object (because the runtime actually instances an object for the behavior). I guess I could exclude behaviors from the count if you think that's useful?
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Mon Oct 06, 2008 8:23 pm

to me it would make sense that it's just the one object, but does everyone else think so?

anyone?

at least I know what's happening now.
B
4
S
2
G
5
Posts: 149
Reputation: 2,025

Post » Mon Oct 06, 2008 8:40 pm

[quote="Ashley":362t70gb]It's correct it counts as two objects: one object is the object itself, and the behavior counts as another object (because the runtime actually instances an object for the behavior). I guess I could exclude behaviors from the count if you think that's useful?[/quote:362t70gb]
any way to just make counting behaviors optional?
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Tue Oct 07, 2008 2:13 am

[quote="dfyb":p3rnb5gh][quote="Ashley":p3rnb5gh]It's correct it counts as two objects: one object is the object itself, and the behavior counts as another object (because the runtime actually instances an object for the behavior). I guess I could exclude behaviors from the count if you think that's useful?[/quote:p3rnb5gh]
any way to just make counting behaviors optional?[/quote:p3rnb5gh]
Yeah, make a radio button that says something like "include behaviours"... then you could check sprites/objects only, or get a full rundown of everything.

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
45
S
17
G
37
Posts: 2,853
Reputation: 25,966


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests