Multiple Levels on different layouts

Discussion and feedback on Construct 2

Post » Mon Aug 13, 2012 8:26 pm

I want to have multiple levels on different layouts.

How do I do this but still preserve non-default properties of sprites. For example I create a player object, adjust say it's max Speed. Then when I import it into a new layout it has the default max speed.

Is there any way to import the object from the original layout.

Thanks
B
11
S
4
G
3
Posts: 70
Reputation: 3,071

Post » Mon Aug 13, 2012 11:44 pm

Make it a global object?
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Wed Aug 15, 2012 11:05 pm

Ah thanks, this is what I thought. But I can't find how to do it.
B
11
S
4
G
3
Posts: 70
Reputation: 3,071

Post » Wed Aug 15, 2012 11:10 pm

Got it. Thanks.
B
11
S
4
G
3
Posts: 70
Reputation: 3,071

Post » Thu Aug 16, 2012 1:02 pm

Glad to be of help. :)
B
47
S
10
G
6
Posts: 455
Reputation: 8,326

Post » Thu Aug 16, 2012 10:31 pm

it would be better if you use the text variable so you must use ""
B
48
S
15
G
6
Posts: 795
Reputation: 12,035

Post » Fri Aug 17, 2012 11:37 pm

Depending on your intentions and development for the game, I would suggest using a text variable or global variable to keep track of your sprites attributes. I suggest this from experience, as it should provide more control over the sprite and reduce the chance of unexpected problems.

In otherwords, you set the sprite's speed to a global variable 'Speed' constantly or at relavent events. If you want to increase your sprite's speed you alter the global variable and the rest follows. Then on each layout you create your sprite and set its variables to the appropriate global variable. While it may seem more time consuming at first, it can prevent confusing later on in your game. But different people have different progamming habits, so anyway is free.
B
85
S
31
G
14
Posts: 106
Reputation: 16,440


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 15 guests