User Tag List

Results 1 to 6 of 6

Thread: Multiple

  1. #1
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Multiple

    is there a way to tell when like a counter equals a multiple of a number? Like if I want to set the counters multiple to 10 and like 10, 20, 30.... it does the actions I want it to?

  2. #2
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple

    check if: value mod 10 (or whatever the multiple is) = 0

    so something like:

    value("Score") mod 10 = 0
    + Only one action when event loops (usually)
    --> [do whatever]

  3. #3
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple

    I don't understand...

  4. #4
    Forum Moderator Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Jun 2006
    Location
    England
    Posts
    3,546
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Multiple

    If you do (Number 1 mod Number 2) it will return the remainder of Number 1 divided by Number 2. The two numbers are the operands and "mod" represents the modulo operator.

    If they are multiples then the remainder will be 0. Hence you can use the special object's "Compare two general values" condition to compare the mod operation with 0 to determine that they are multiples. The "only one action when event loops" is another condition of the special object which means the event will not be triggered repeatedly while it remains true (although this will mean if it jumps straight from one multiple to another it won't detect it).

    This has many uses, for example n mod 2 will return 1 if it an odd number and 0 if it is an even number. See http://en.wikipedia.org/wiki/Modulo_operation for more details.
    .:::.Joshtek.:::.

  5. #5
    No Products Registered

    Join Date
    May 2007
    Location
    Christopia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple

    I think I've asked this before, and sorry to ask again, but how do you do square root?

  6. #6
    No Products Registered

    Join Date
    Dec 2006
    Posts
    1,332
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Multiple

    Sqr()

Similar Threads

  1. multiple instances spawning at multiple places
    By CPW in forum Multimedia Fusion 2 - Technical Support
    Replies: 17
    Last Post: 22nd February 2009, 12:38 AM
  2. Importing multiple animations as multiple frames
    By Shawn in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 25th November 2008, 09:36 PM
  3. Multiple PMOs for multiple Objects
    By Blood_Wist in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 31st May 2008, 01:49 AM
  4. Multiple PMOs for multiple Objects example
    By Blood_Wist in forum File Archive
    Replies: 1
    Last Post: 31st May 2008, 01:48 AM
  5. Multiple Turret Shooting With Multiple Targets
    By Brandon in forum File Archive
    Replies: 4
    Last Post: 29th January 2008, 02:34 AM

Posting Permissions

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