1
$\begingroup$

I am new to the Blender Game Engine. I am trying to create a simple game. I have an object (enemy) that I want to move forward then rotate 180 degrees and then repeat, so that it is moving back and forth along a straight path. I can create the actuators to move it forward or to rotate, but not one after the other. Does this require a python script? Or is there a way to do it just in logic bricks? My logic layout

$\endgroup$
2

1 Answer 1

1
$\begingroup$

You need to sense the end of the previous operation to start the next one.

As motion actuators (mentioned in your screen shoot) have no end you can start the followup operation when you deactivate the current one.

According to your description I suggest to use steering actuators with enabled self-termination together with the method described in How to start second action after check that first one is done in bge?.

This allows you to let the enemies patrol between various checkpoints. Moving to a specific checkpoint is represented/performed by a single steering actuator.

I hope it helps.

$\endgroup$
2
  • $\begingroup$ Thanks but doesn't changing states also work?? $\endgroup$
    – fireninja
    Jul 20, 2016 at 13:26
  • $\begingroup$ You do not need states as the "state" is the currently running operation. You can change states to separate each sequence a bit more (visual and regarding logic handling). This has some benefits. $\endgroup$
    – Monster
    Jul 21, 2016 at 12:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .