Shooting an object at another object is wildly inaccurate

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Evening all,

    I have an active (Circle) which rotates and the action point is set to the outside of the circle
    I have another Active (target) which is fixed to the circles action point
    I then have an action that states "When left mouse is clicked stop rotation of circle and launch object in direction of target"

    problem is the "bullet" never passes through the target active and sometimes misses by as much as 32 pixels.

    I am sure I saw a shooting example as a lopop on here but i cant for the life of me find it anywhere.

    Any ideas or a link to the above example?

  • There are a lot of 360 degree shooting examples but I would also love to see an example file of what your doing to see if we can make the built in shooting better.

    Check this site for the examples.
    Please login to see this link.

    Please login to see this link.

  • You can get this kindog inaccuracy when using some of the built in movements, since many of them use 32 directions only.

    For more a more accurate/ smooth result you should do 2 things.

    USE FLOAT X Y COORDINATES
    The built in coordinate system is int based, meaning an Object cant have a X or Y coordinate of, say, 5,5 or 8,33 ( if you try it will 'round' the coordinate ).
    This is in many cases a problem if you want to apply more smooth movements to Objects.
    AlterableValues can hold Float values ( decimal numbers ), so to use Float coordinates give your bullet 2 AltValues called X_ and Y_.

    USE 360 DEGREES OF MOVEMENT
    Many of the built in movements are limited to a maximum og 32 directions of movement, wich as you have experienced can be quite inaccurate for longer travel distances.
    To give your bullet 360 degrees of directional movement as opposed to only 32 directions, give your bullet an AltValue called Angle_

    MOVE
    To now make your bullet move in a direction at a speed, do this code:

    + Allways
    -> bullet set X_ to X_ - Sin( Angle_ ) * speed
    -> bullet set Y_ to Y_ + Cos( Angle_ ) * speed

    How can i change username and display name?
    Please login to see this link.

  • ...but I would also love to see an example file of what your doing to see if we can make the built in shooting better.

    I have an example of this, click Please login to see this link., click Mercury, and try to shoot all the aliens without moving, especially the middle row.

    Please login to see this link., Please login to see this link.
    Discord: Please login to see this link., Please login to see this link., Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!