Initialization with logic bircks

HI everybody !

I’ve a problem here, I think this totally basic but I can’t put the finger on what’s wrong.

I’m trying a simple thing. Get an initialization logic thats sets up the current scene and an overly scene. ( ok, I could probably scrip that, but the logic bricks act strange so I would appreciate some help to understand what happens here)

My idea is :
Set up a game property named “init”, boolean, false,
get a property sensor that check that "init"is false,
link it to the scene actuators, and the link it to a property actuator that toggle “init” to true.

That’s what I have on “image1”, but as you can see the console tell us the game tries to set the overly scene on every frames…:confused:

Then I tried to setup a timer instead. I put the timer, enter 60 frames, enable tap ( so it only send one positive value then just send negative, is that right ? ) verify the repeat option is OFF and…
The timer keeps reseting over and over…:confused:

I think I really miss something fundamental about logic bricks.

Could anyone help me ?
Or orient me on a good tutorial on logic bricks ? I can’t find on logic bricks bases which is not basic.

Thanks !

Attachments


Here’s the Wiki page about logic bricks. As to your problem, it works for me as you can see. So, I’m guessing it’s the fact that you’re setting the game scene over and over, which is constantly resetting your init variable to 1, though the overlay scene carries over between scene changes (so it keeps getting added). You need to do it in a single scene, before the scene changes (like in the menu).


You were right !

My first brick kept reseting the main scene…

Thank you…

You do not even need a property. An Always sensor without any Pulses set, is enough.