User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12

Thread: Is this valid limiting condition for an event? Individualizing instances.

  1. #1
    Clicker Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jokk3's Avatar
    Join Date
    Dec 2013
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Is this valid limiting condition for an event? Individualizing instances.

    I have an enemy that moves in a group. This enemy shoots if distance of player is under certain amount. However just "if distance < x" does not seem to work. It just pics one of the enemy and if it has TRUE on that condition, it fires (or all enemies fire if the One is in the range). I could do fast loop or for each to individualize enemies and run distance check for each of them. However it seems that adding condition "if fixed value (of enemy) = fixed value (of enemy)" [in another words checking if object is object or x==x]. Should it work like that? Is this valid way of individualising an instance of enemy object?

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,282
    Mentioned
    26 Post(s)
    Tagged
    0 Thread(s)
    You need to do a distance check in a loop to make this work. ForEach will be fastest in this case.

  3. #3
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Philtered_Khaos's Avatar
    Join Date
    Oct 2016
    Location
    Axis Mundi
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not trying to hijack this thread, but could you clarify how you would do "if fixed value (of enemy) = fixed value (of enemy)" in the event editor? I am a noob and trying to figure out exactly this, how to shoot when at a certain distance from player.

  4. #4
    Clicker Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jokk3's Avatar
    Join Date
    Dec 2013
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My point is that it ACTUALLY works without loops with fixed==fixed comparison. My question is should it work like that - is it valid way of doing it, or is it some sort of bug that in a long run might cause issues?

    @Philtered_Khaos:
    For instance isolation: New Event-> active you need to do this-> alterable values -> compare to fixed value -> select same active as before and get it's fixed value and make sure comparison argument is Equal.
    For distance comparison: use Special thing in new event (first on the list) -> compare two general values -> Special thing -> select Distance and Angle... -> Distance between two points -> put in xy of point of projectile start point and xy of the target -> set condition that distance calculation is compared against.

    That seems to work in practise, however I am not sure that it should work in theory, so you might want to do instance isolation part with for each loop. To further complicate things: It actually should work without forEach or fixed==fixed. However ctf2.5 picks only one active seemingly based on the creation order and runs event comparison ONLY on that and then actions that result from this it runs on ALL of that actives (fixed==fixed fixes this).

  5. #5
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Philtered_Khaos's Avatar
    Join Date
    Oct 2016
    Location
    Axis Mundi
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Jokk3 Thanks a ton for the information! I am going to play around with it a bit and see what I can do.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Oh really?? This is a quite interesting discovery!
    Will test it next time I got chance!

    As a side note - you coud very frequently avoid foreach loops, maybe by doing some little extra step,
    but I've been testing this different times, and noticed there was no appreciable difference in performance

    ie. between using, say:

    flag 0 on
    >>> start loop foreach

    on each one of
    >>> do this

    and:

    flag 0 on
    >> do this

    I've tried it in more complex situations, and also with P3D, which does a quite intensive job with many calculations,
    I spent some hour rewriting the code and redoing all the pipeline of 3d object deformations without foreach...
    there was not the smallest difference in framerate :|

  7. #7
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    644
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    It should work using simply "if distance < x" for every instance.

    At least it does on my end: no loops shoot.mfa

    If you're using "Compare two general values" to compare distance, that's what broke your object scope. C2GV doesn't take scope into account, whereas comparing directly from an object's alterable value, flag or fixedID iterates through each instance and does a check for them.

  8. #8
    Clicker Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jokk3's Avatar
    Join Date
    Dec 2013
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried this (fixed==fixed) on simple scale, but it fails in that. Seems like it is some other event in my more complex game that somehow "pics" the instance... However it still fails in the complex game without the fixed==fixed, so casleziro might be onto something.

  9. #9
    Clicker Fusion 2.5Fusion 2.5+ DLC
    casleziro's Avatar
    Join Date
    Mar 2013
    Location
    United States
    Posts
    644
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Read my edit above; using "Compare two general values" is most likely your issue.

  10. #10
    Clicker Fusion 2.5 MaciOS Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Jokk3's Avatar
    Join Date
    Dec 2013
    Posts
    74
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I did not realize that about C2GV. It seems that, for example, updating object's alterable value inside "always" event to the result of distance calculation, gets the correct results when comparing object's alt. val to desired number.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 4th April 2016, 02:25 PM
  2. Bad Event of the condition
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 25th February 2013, 11:26 AM
  3. Checking that all instances meet a condition
    By Keith in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 22nd August 2011, 02:07 PM
  4. Condition if any instances of object at same frame
    By Keith in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 13th August 2011, 03:14 PM
  5. Can two or more fastloop condition on same event?
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 9th February 2010, 12:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •