How do I reset a game ?

Just started using Construct 2? Post your questions here

Post » Wed Mar 26, 2014 5:18 pm

Well, I don't see any improvement. My objects with Persist behaviour will still stay dead/destroyed (or whatever state they were in when layout was reset) no matter if I set Global to No or Yes, when using the Reset global variables to default action. I think actually not using Persist might be a better option in my game.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Sun Apr 06, 2014 12:12 pm

Actually you're right. It doesn't work with persist objects ... That sounds a bit weird that there's absolutely no way to reset such objects.
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Sun Apr 06, 2014 5:43 pm

Indeed, the persist behavior doesn't seem to have been thought for the "reset" case.
That's something @Ashley might want to have a look on, to add a way to reset a game that uses Persist behaviors.

In the absolute, I think the persist behavior wasn't really intended to be used in such games since its point is to remember the state of the objects, so you are expecting a persistent world, not necessary a world you would reset/start from scratch all over again.

Global property set to "Yes" just makes that the instances don't get destroyed when moving from a layout to another. The object that is set to global also stays at the same position when changing the layout.
So it does not sit well with the persist behavior anyway.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Thu Apr 10, 2014 11:52 am

So maybe we should use a posivite global property for persistant objects ? I will try that, thanks
B
8
S
4
Posts: 131
Reputation: 1,205

Post » Thu Apr 10, 2014 12:00 pm

Kyatric wrote:Indeed, the persist behavior doesn't seem to have been thought for the "reset" case.
That's something @Ashley might want to have a look on, to add a way to reset a game that uses Persist behaviors.

In the absolute, I think the persist behavior wasn't really intended to be used in such games since its point is to remember the state of the objects, so you are expecting a persistent world, not necessary a world you would reset/start from scratch all over again.

Global property set to "Yes" just makes that the instances don't get destroyed when moving from a layout to another. The object that is set to global also stays at the same position when changing the layout.
So it does not sit well with the persist behavior anyway.


A bit off topic, but are you saying I could use Global=Yes to keep a moving object start in a new layout at the same place it stopped in the previous layout, instead of using variables and set position actions?
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Thu Apr 10, 2014 1:00 pm

@oceldot: That's a possibility indeed. But whether it's the most appropriate solution depends on the game you're making and how you did it so far.
It's just one available tool.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
284
S
109
G
91
Posts: 7,317
Reputation: 87,483

Post » Thu Apr 10, 2014 4:49 pm

Kyatric wrote:@oceldot: That's a possibility indeed. But whether it's the most appropriate solution depends on the game you're making and how you did it so far.
It's just one available tool.


Thanks, I'll play around and see which option works best for me.
B
14
S
3
Posts: 123
Reputation: 1,571

Post » Fri Apr 11, 2014 11:51 am

It seems Global was just what I needed. Say, would it have any effect on performance to use Global on all of my HUD objects? If I only need to put the objects there in the first layout, maybe it would save some memory as I don't need to put them there on other layouts.
B
14
S
3
Posts: 123
Reputation: 1,571

Previous

Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 0 guests