Simulate control is not working on any behavior

  • Hello! I'm making an endless vertical scroller shooting game. The game will spawn random enemy waves for the player to fight against and I'm trying to make custom pattern-based movement for the enemies themselves, to add some predictability. I have tried using Car, 8Direction and Pathfinding behaviors. However, none of them is working.

    The pathfinding works to some extend, such as moving to a place in the screen, but it doesn't move outside the screen, which is something I need. So I have tried the Car and 8Direction movement, but they are not moving on Simulate Control. Simply nothing happens. Here is how I'm creating the enemies and moving them:

    They get created successfully, and when using Pathfinding they actually move, but not when using Car or 8Direction.

    I have the following behaviors and configurations set for them:

    Am I doing anything wrong?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Simulate control is working, it's just happening for a moment with those events. So any changes are not really noticeable.

    Maybe add a variable to bat to tell it what to do. Call it "state" or something. Then just add a event to to simulate the control continuously depending on the state.

    Bat: state = "wave one"

    -- bat: simulate control turn left

  • According to your code, you activate the motion simulation for one tick every x seconds. By comparison, how far would a car go if you hit the accelerator for 0.016 seconds?

    Pathfinding also works outside the visible area, but not outside the layout, which you probably mean. In this case, you can also enlarge your layout and fix the camera in the middle. Then you can also spawn opponents out of the field of view and move them with pathfinding.

  • I didn't know that the Simulate would only happen for a single tick. Thank you!

    Pathfinding also works outside the visible area, but not outside the layout, which you probably mean. In this case, you can also enlarge your layout and fix the camera in the middle. Then you can also spawn opponents out of the field of view and move them with pathfinding.

    Really? I've read somewhere that it wouldn't calculate outside the viewport for performance issues. If it does, that would help me a lot, thank you for this info!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)