How do I Draw Obstacles??

Get help using Construct 2

Post » Sun Apr 24, 2016 5:53 pm

@hmann128
There are a few ways to do it. The simplest is to make the objects global so they won't be destroyed when the layout changes.

Another idea is to store the object's info in an array, then looping over the array to re-create from that. Here's one possible example:
viewtopic.php?f=147&t=167097&p=1007621&hilit=save#p1007621
This may be an overkill for what you want, but the idea is there.
B
91
S
31
G
103
Posts: 5,241
Reputation: 67,768

Post » Sun Apr 24, 2016 6:57 pm

R0J0hound wrote:@hmann128
There are a few ways to do it. The simplest is to make the objects global so they won't be destroyed when the layout changes.

Another idea is to store the object's info in an array, then looping over the array to re-create from that. Here's one possible example:
viewtopic.php?f=147&t=167097&p=1007621&hilit=save#p1007621
This may be an overkill for what you want, but the idea is there.


Hey R0j0,

what route would you recommend in this scenario:

The player draws a route and this route is shown on the next layout in which the player must navigate the layout. Once the player has completed this layout the game finishes. The game then restarts and allow the player to draw a new route. Idk if that makes sense but im guessing making the objects global may not be able to apply to what I am trying to do?
B
3
Posts: 9
Reputation: 193

Post » Sun Apr 24, 2016 7:04 pm

Just make the objects global and destroy them at the start of the first layout.
B
91
S
31
G
103
Posts: 5,241
Reputation: 67,768

Previous

Return to How do I....?

Who is online

Users browsing this forum: bluesun66, tarek2 and 2 guests