Object x gets close to active xx, do xxx.

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.
  • Hi.

    I have made a simple example for you.

    It will check the distance between the player and the NPC, if it is lower than 100 pixels it will set the Alterable Value of the NPC named "Followmode" to 1.

    If the Alterable Value "Followmode" of the NPC object is 1, and the distance between the player and the NPC is greater than 32 pixels, it will start the "Bouncy ball movement" and "look at the player" this will let the NPC follow the player.

    If the distance is below 32 pixes it will stop so it won't overlap the player.

  • If you want this to work for multiple Enemies you aught 'put the distance calculation into the NPCs AlterableValue', and then compair 'directly' to this AlterbleValue when checking the distance.

    Reason this works for multiple Enemies:

    - Say you have multiple Object Instances
    - When creating an Event and adding a Condition that is 'directly related'* to the Object, Fusion will automatically 'Select' the Instances complying with the Condition/s and also apply the relevant 'Actions' only to the selected Instances complying with the Condition/s.
    - The distance calculation in the example is directly relatedto the 'Special Object' ( cointaining special functions, in this case a function calculating distance between 2 Objects ) and not the actaull Object we are working with, and thus the Instance selection explained above does not apply or take place ( something else happens instead, but i dont want to get into that right now )

    OK, ill get into it.
    As the Condition in this case ( as per the example above by Decal ) is NOT directly related to the Object, the Event ony checks if the 'last created' Object Instance complies with the Condition/s and furthermore Applies the Events Actions to ALL Object Instances if the Event is true.

    * If you create a new Condition and right click on an Object, any of theese conditions are 'directly related Conditions' to that Object

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

    Edited 5 times, last by King_Cool (January 28, 2016 at 3:31 PM).

Participate now!

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