How do I create a Sprite without adding it to Layout before

Just started using Construct 2? Post your questions here

Post » Wed Dec 09, 2015 9:30 pm

Hi everybody,

I'm wondering how I can create a Object/Sprite without adding it to the Layer once before.

For example:

I have fruits falling from the top. If a fruit hits the floor the player loses one life.
How can I setup the fruoit (e.g. add falling behaviour etc) without adding one initial fruit to the layout, which means that it will fall down on game start and costs a life of the player.

Edit:
I tried setting up the fruit and removing it from the layout after that. Then it's saved as Sprite with every setup in the project but if the game tries to init such an object the browser shows an error message.

Thanks.

Best regards
B
5
Posts: 15
Reputation: 241

Post » Wed Dec 09, 2015 9:38 pm

Two possibilities:

1. Just destroy the sprite on Layout Start
2. Have a separate Layout just for graphics, therefore they are always available to the project.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
130
S
29
G
80
Posts: 5,265
Reputation: 55,962

Post » Thu Dec 10, 2015 12:18 am

"2. Have a separate Layout just for graphics, therefore they are always available to the project."

... You can do that? Why hasn't this been mentioned in every tutorial I've watched? Good to know.
B
194
S
108
G
7
Posts: 132
Reputation: 19,285


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 1 guest