Question About Behaviors

This forum is currently in read-only mode.
From the Asset Store
Logo Quiz with 150 prepared logos and answers, automatic question and answer mixing
  • Ive been playing around with construct for a couple of days now, and came up with a question about behaviors. Is it possible to modify them in any way? Specifically, is it possible, say, with the car behavior type to change it so that it simply turned when the left or right button was pressed instead of needing the forward press as well? I played around with making a similar behavior pattern using just the event sheet editor, with limited results. Any input would be appreciated. Thanks!

  • if i understand you correctly, you want the car to move automatically without a 'forward' input - but still let you turn. you can do this by doing

    always

    • Car: set speed to x

    and x = how fast you want to go (200 or whatever).

    edit: if you dont' want it to move when you're not pressing anything, do this:

    Key Left Arrow is down

    OR

    Key Right Arrow is down

    -Car: set speed x

  • Ok, perhaps I need to clarify a bit. I was hoping to set up the controls similar to this:

    Forward arrow: Apply thrust

    Right arrow: Rotate/Turn right

    Left arrow: Rotate/Turn left

    The hope was to be able to modify one of the existing behaviors so that I could apply it to a number of different ships (the goal is to create a little space shooter similar to star control/the ur-quan masters). I have looked at the spaceship.cap demo file and found it to be very helpful, but wanted to apply a similar movement principle without the mouse being the guide for the ship so that hotseat (or eventually network) play could be functional.

    Another related question: is this where the timedelta function could be used? I have little to no experience with that function.

  • oh, spaceship controls. well using the car behavior --

    Key Right arrow is down

    +is not moving (do 'is moving' and then invert condition)

    --ship: rotate x degrees clockwise

    Key Left arrow is down

    +is not moving (do 'is moving' and then invert condition)

    --ship: rotate x degrees counter-clockwise

    so that when you aren't moving, it will rotate when pressing left or right. if you omit the 'is not moving' condition, it'll still work.. but it'll be pretty wonky when moving because of the extra rotation.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok. Thanks, ill give that a shot.

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