Copying logic bricks to other states (yet another Q for A's)

Anyway to copy and past logic bricks over to other states? (or a plugin that allows that…)
Would make my life a whole lot easier!

Sensors and Actuators are available for all states. They might be not visible when connected to a controller of an hidden state. You can change that by selecting the appropriate flags above the sensors/actuators header.

A controller belongs to one state only. You can assign it to another state by selecting the state number when the controller is expanded. Be aware the controller will disappear from view as long as the the new state is not visible. You can show multiple states by holding shift while selecting/deselecting states in the states panel.

Something I have been wondering about is if there is any way to move/copy logic bricks between objects at design time. Seems like it would be pretty handy if you have done something time consuming in logic bricks, but decide later to re-organize object relationships & stuff.

you can copy all logic bricks to other objects.

In 3D view

  • select the objects to receive the bricks,
  • shift select the object to get the bricks from (will be highlighted)
  • <space> and type: “copy game” …

Be aware this replaces any existing logic bricks.

In general I advice to keep as less logic as possible at a single object (regardless of bricks or Python code). It is better to have several objects each with a specific purpose rather than one object cluttered with multiple purposes. This allows to quickly exchange them according to your needs just be adding/removing/replacing the object.

you can copy all logic bricks to other objects. …
Ah! Cool.

In general I advice to keep as less logic as possible at a single object

Yeah, this makes sense. I try to (eventually) design most things as a way to organize interactions generically between objects, rather than as behaviors OF specific objects. But when you are just prototyping a specific behavior, it is nice to be able to pile it in one place until you figure out what sort of dependencies there are between objects, and how to generalize them.

1 Like

Handy to know ^^
I’ve marked this solved.
Thanks Monster ^^