is there a 'destroy on start' feature?

For questions about using Classic.

Post » Fri Apr 10, 2009 1:11 am

other than destroy in start of layout action, is there one like there is an invisible on start?
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Fri Apr 10, 2009 1:26 am

Like Destroy on Startup, maybe?
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630

Post » Fri Apr 10, 2009 1:55 am

yeah, just like that!
Spriter Dev
B
88
S
21
G
12
Posts: 3,240
Reputation: 16,486

Post » Fri Apr 10, 2009 9:14 pm

Or you could make an event that changes an objects opacity to 0% on start of layout.

System>Start of layout
"your object here">Set Opacity> 0
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Fri Apr 10, 2009 9:24 pm

If you set opacity to 0 the object still exists, and is still processed by the GPU.

If you "Set visible" to invisible, it still exists, but is no longer processed by the GPU.

The Destroy on Startup attribute is the most efficient way to get rid of any objects that you don't need right away, you can always spawn or create them later at runtime.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Apr 10, 2009 9:26 pm

Every object which displays stuff should have an 'invisible on startup' property; stick a quick item on the feature tracker if not.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sat Apr 11, 2009 11:52 am

[quote="Wheeze201":2lwvcrrg]System>Start of layout
"your object here">Set Opacity> 0[/quote:2lwvcrrg]
Just want to reiterate what Deadeye said: this is a really bad idea! It will waste rendering time, use more memory, and slow down collisions and the event engine, if you did it with a lot of objects. If you don't need an object, destroy it! If you don't want it shown, set it invisible!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,630


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests