Howdo I Get an Obj Bullet to Work after Changing Obj Locatio

  • I have been working on something in Construct 2 for awhile and for whatever reason if I have an object that has bullet enabled and working like normal and then I do "Set Position to(x,y)" the bullet seems to stop working. The object moves to the new position but bullet does nothing.

    I have tried disabling and enabling the bullet,, change angle of motion, bullet speed and acceleration and nothing seems to help.

    Am I misunderstanding what set position is doing?

  • I just made a very simple capx and couldn't reproduce the issue. It is likely something in your events that is causing it. Try stripping your project down until you get it to work correctly. Or you can post your capx and we'll take a look for you.

  • ok thanks...damn it.

  • I am guessing this is happening because I am trigger an event to happen when Value = 2. At Value =2 it is doing Set Position(x,y) thus it keeps hitting that position over and over again until the value does not = 2.

    I did a test where I did an object create instead and the object just kept recreating itself. How do you have an action only run one time when using a variable?

    I made a work around where I had more than variable but man that is a pain...thought there would be an easier way.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • OH I found another condition If object is outside of layout...that might make my event easier to use.

  • Can you add System > Trigger once while true under your variable condition?

  • Can you add System > Trigger once while true under your variable condition?

    Brilliant! I totally forgot about that command...I came up with this crazy 3 object and 2 variable solution in the past and thought...I cannot believe this is not an easier way!

    Thanks...My bullet is doing something wonky but I should be able to sort that out!

  • You're welcome. Good luck.

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