Debug Layout

Get help using Construct 2

Post » Mon Feb 24, 2014 12:23 pm

B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Mon Feb 24, 2014 12:44 pm

Thank you soo much.
But why did that work?What's the logic?How is it different from my other capx?
(I am very maths type so I will need proof for my mind to work correctly ;) )
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Mon Feb 24, 2014 12:55 pm

in your example you are saying (every tick)

if score > 5 then ....

in mine I am saying

is the map almost off screen ? Yes then
has the map already called for a new map to be made ? no then
Call for a new map (once) and while there check the score if the score is > 5 add the skeleton.

so it only calls for a new map if the old map is almost off the screen and the old map has not yet called for a new map. The call for a new map also checks the score and acts on the skeleton accordingly.

Make sense ?
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Mon Feb 24, 2014 1:03 pm

RamPackWobble wrote:in your example you are saying (every tick)

if score > 5 then ....

Ok.I knew it...

RamPackWobble wrote:has the map already called for a new map to be made ? no then
Call for a new map (once) and while there check the score if the score is > 5 add the skeleton.

.... and the old map has not yet called for a new map.
Make sense ?

Where does this already/not yet called comes from?

I understand all other parts.So,because the function was a trigger which was only called once,the skeleton was created once.Am I right?
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Post » Mon Feb 24, 2014 1:28 pm

The already called/not called is the green highlight in the earlier screen capture/ event sheet picture.

The function new map should only be called once per "old" map - part of this function is now to check the score and create the skeleton if the score is over 5 (in this example)
B
64
S
33
G
47
Posts: 1,194
Reputation: 30,812

Post » Mon Feb 24, 2014 2:07 pm

Once is because it's a trigger?hmm I understand now.Thanks a lot.Your name will also be included in the Credits :D
B
11
S
5
G
2
Posts: 496
Reputation: 2,306

Previous

Return to How do I....?

Who is online

Users browsing this forum: DarkRoomGames, mekonbekon, yippiez and 11 guests