Suggestion: If object close to another object X pixels

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.
  • If Clickteam Fusion 2.5 doesn't have this feature to check that if Active is close to another object by X pixels then action, you can include it in the new Clickteam Fusion for the users!

    It will get turrets for example to shoot only if an object is close enough to their range! Please consider adding this feature to it even now!

    For example:

    -Distance of Soldier1 is close by X or less to Turrent -> Shoot bullet
    -Distance of Light3 is close by X pixels more to Battery1 -> Make light3 transparency ink effect value to 32
    -Distance of alien is close by X pixels to Detector -> Play sound Alarm.

    I hope that CF2.5 already has such feature because if not, then clickteam must add it under "distance to another object"!

    Peace & Love

  • CF2.5 specifically had this added... You can find it in the Special Conditions. You can get distance and angle. :)

    Please login to see this link.

    My examples:
    Please login to see this link.
    Please login to see this link.
    Please login to see this link.

  • Konidias, I didn't know the above had been added. Had a quick look but can't get it to work. Asking because I usually stretch an active from the player sprite to the enemy instance to get the distance. This may save me that hassle.

  • What build of Fusion 2.5 are you using?

    I've not had any problem with it, but perhaps you are doing it so it only checks against the first soldier / turret. Are you using a "For Each Object" / "For Each of Two Objects" loop to test each object? This feature is listed under an object, under "Count", and runs a fastloop per object(s).

    Ensure you are entering the right inputs, e.g. Distance(X( "Active" ),Y( "Active" ),X( "Active 2" ),Y( "Active 2" ))

    .:::.Joshtek.:::.

    Visit Please login to see this link. to publish your freeware Click games and play games made by others or check out Please login to see this link. to enjoy or contribute to our archive of over 3,200 older Click games.

  • The angle and distance functions are great but it would actually be a good idea to have an event condition to test for this. ie: If "Object A is within 'n' pixels of Object B" just like the "Object is getting closer than 'n' pixels from window's edge" under the position conditions. Would mean no need to construct foreach tests on all objects in events, Fusion would be able to filter more efficiently.

    Nice one NastyMan, anything to make things easier to do is surely a good idea - Please login to see this link..

    Andy H @ Please login to see this link. - Please login to see this link.
    Retro Gaming @ Please login to see this link.

  • Joshtek, thanks. It was me doing it wrong. Sorted.

    AndyH, yes, Nastyman's idea would be easier. Something else that could prove useful: a "Line of sight is clear" condition that highlights when "Object A is within 'n' pixels of Object B" is being used. Or they could use a similar format to Distance: Line of sight (X( "Active" ),Y( "Active" ),X( "Active 2" ),Y( "Active 2" )) is clear. Maybe it could be implemented so you don't have to mess about scaling actives and checking for overlaps with background/active obstacles.

    Edited once, last by Caesar (January 19, 2014 at 12:26 AM).

Participate now!

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