[SOLVED] Two questions.

Just started using Construct 2? Post your questions here

Post » Tue Nov 10, 2015 7:32 pm

Hi, please can someone help me with these questions?

1 - I'm not sure the issue of "wait".

I have a capx in which "every 1 second" increase the frame of a sprite animation and increase the value of an instance variable named "var" in a unit.

The problem is that the frame is increased more rapidly than the variable.

The variable increases every second, this guess is correct.
But the frame animation increases much faster, I do not understand why.

I have read tutorials and manual but do not quite understand, please, could someone explain to me why every second frame increases faster than the variable "var" ?.

You can check the value of the variable "var" if running in debug mode

dl.dropboxusercontent.com/u/60803633/wait.capx

You need to add h t t p s: // a link.

-------------------------------------------------- -------------

2 - The other issue is about "restart layout".

When I use "restart layout", all belonging to sprites die layout and then automatically re-create?
Last edited by The Mnk on Wed Nov 11, 2015 11:19 am, edited 1 time in total.
B
29
S
12
G
20
Posts: 759
Reputation: 13,861

Post » Wed Nov 11, 2015 4:26 am

1. You need to change the speed that the animation is playing for 'Sprite' to '0' from the animation editor. Currently it is set to '5' which is causing the issue.

2. Unfortunately I am unsure about this one. I know that setting an object to be 'Global' prevents it from being destroyed at the end of a layout.
B
10
S
2
G
2
Posts: 87
Reputation: 1,274

Post » Wed Nov 11, 2015 9:43 am

Thanks for the help, the first issue was resolved, I now understand better the relationship there.

The second remains unclear.

The question is:
When I use "restart layout", all sprite objects belonging to that layout are destroyed and started again with the new layout ?.
B
29
S
12
G
20
Posts: 759
Reputation: 13,861

Post » Wed Nov 11, 2015 11:15 am

Manual wrote:Global
By default, all instances are destroyed when the layout ends .
If Global is Yes, none of the instances of this object type will be destroyed ...

Instances

Image
Image
Image
B
64
S
23
G
7
Posts: 1,483
Reputation: 10,827

Post » Wed Nov 11, 2015 11:19 am

Understood thanks!.
B
29
S
12
G
20
Posts: 759
Reputation: 13,861


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests