Easy editing on layers?

Get help using Construct 2

Post » Sat Jan 21, 2012 12:12 am

Hi Guys.

Is there a way to aply a change to all layouts. Lets say i have a sprite on all layers. And if i change the sprite position on layer 1 - can it also be automaticly aplied to the other layouts?

I know about "global" but many of my items are text objects with variables. And i dont want theese variables to continue on the next layers.

So.. any ideas how to make my work a bit easier?
B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Sat Jan 21, 2012 4:35 am

You might want to create a new event sheet you could call 'initialization' and put a
[code]System: on start of Layout
-> Sprite: set position to (whatyouwantX,whatyouwantY)
-> any other thing you want to do on start of layout for each layout[/code]
And include this in the event sheet of all the layout you want this to happen.

And as Kyat would say: here is the manual entry about event sheet inclusion http://www.scirra.com/manual/82/includesYann2012-01-21 04:36:04
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Post » Sat Jan 21, 2012 11:53 am

Thanks Yann.
i'll try that.

B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Sat Jan 21, 2012 1:34 pm

i have to create the sprites, objects, texts first i guess?
System create ?
or am i wrong? :D
B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Sat Jan 21, 2012 1:56 pm

Creating many objects on "Start of layer" will that slow things down?
B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Sat Jan 21, 2012 2:10 pm

Shouldn't make a significant drop in speed.

There is a little trick i allways use. I have a layer with a loading sprite on, Then i use the system.compare 2 values. Im comparing the FPS, If its over 20 - 25 then start the game.

That way there will be no lag at the beginning that the user would see.
B
29
S
12
G
7
Posts: 740
Reputation: 7,849

Post » Sat Jan 21, 2012 2:47 pm

Damn thats smart smitchell!
Is there an fps plugin? or did i miss it?

Thanks for the tip. Thats clever :D
B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Sat Jan 21, 2012 4:58 pm

[QUOTE=smitchell] I have a layer with a loading sprite on, Then i use the system.compare 2 values. Im comparing the FPS, If its over 20 - 25 then start the game.

That way there will be no lag at the beginning that the user would see.[/QUOTE]

Could you post an example CAPX for stupids like me?
B
42
S
19
G
12
Posts: 723
Reputation: 13,911

Post » Tue Jan 24, 2012 11:57 pm

smitchell - but im wondering - if they never get to that fps, they cant play the game right? or am i missing something :D?
B
34
S
8
G
7
Posts: 498
Reputation: 7,753

Post » Wed Jan 25, 2012 6:46 am

Heh good thinking, but if you just create a bunch of sprites on start of layout, first I don't think the fps will drop that much, and second it will just drop like a few miliseconds on start and will be fine afterward.
B
60
S
22
G
14
Posts: 1,479
Reputation: 16,346

Next

Return to How do I....?

Who is online

Users browsing this forum: DiabloOvermind, MrWhizm, Skebab, spcsmrf and 23 guests