Problem with bullet behavior

0 favourites
  • 6 posts
From the Asset Store
This pack contains 10 types of bullet effects, with different shapes and colors.
  • I've a problem to use a bullet angle motion action. Something is wrong. I don't know if it's a bug, so I'm posting it here.

    I used a variable to store a random angle and I noticed that the sprite always moves horizontally (0 or 180), never vertically. So, I tried to put an angle value directly instead of using a random angle and the sprite maintain the same directions.

    The respective part of my script:

    Thanks in advance for any help.

  • can you duplicate it in a small capx and post it?

    the bullet behavior is pretty bullet proof, no pun intended.. sounds like you are just overlooking something easy..

    do you have "set angle Yes" in your behavior properties?

  • Hi jobel

    Sorry about the CAPX. I always uploaded a project but in this case it's not possible. The project is quite large.

    I'm glad do hear that bullet behavior is okay, but I don't understand how the direction moves only horizontally when I defined a absolute angle. I tried inclusive to set the angle to 45 degrees, directly in the action, and nothing changed.

    The "set angle" option is "No". I'll review the script again. Who knows ....

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I think you have to set the speed first, then the angle, as with a speed of 0 the angle of motion won't be changed (as there is no motion..)

  • the mistake is that u used choose (0,180,90,270) in which case choose will automatically choose from left to right one of those variations, however if you'd be adding choose(0,180,90,270,0,180,90,270,0,180,90,270) wold increase the chances for the choose function to actually pick 270 or 90 ! atleast that's how i make it in order to avoid creating repeat N times functions.

    however the system seems to kinda like the pare numbers as in 0,2,4,6,8,.......180....... and so on so it will automatically most of times choose 0 or 180

  • I think you have to set the speed first, then the angle, as with a speed of 0 the angle of motion won't be changed (as there is no motion..)

    Aphrodite

    You're awesome! Thank you very much! (I'm not French, but I make a point: Merci beaucoup)

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