User Tag List

Results 1 to 10 of 10

Thread: Coding or formula help

  1. #1
    No Products Registered

    Join Date
    Nov 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Coding or formula help

    What I'm tring to do is use a counter and when the counter = 1,5 7,9 then 1 of 3 diamonds appears and if that the first diamond is visible the 2nd diamond appears, if the 1st and 2nd diamonds are vivible, the 3rd diamond appears. I think this can be done using 2 counter and 21 lines of conditions. I'm just looking for any easier more streamline way of doing it.

  2. #2
    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,515
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Re: Coding or formula help

    I don't understand the diamond thing, but you could try something like:
    [events]
    * Counter > 1
    + Counter < 10
    + Counter <> 2
    + Counter <> 3
    + Counter <> 4
    + Counter <> 6
    + Counter <> 8
    -Do stuff
    [/events]
    .:::.Joshtek.:::.

  3. #3
    No Products Registered

    Join Date
    Jul 2006
    Location
    Umeň, Sweden
    Posts
    1,090
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding or formula help

    [events]
    * Counter > 0
    + Counter < 10
    + Counter mod 2 = 1
    -Do stuff
    [/events]

  4. #4
    No Products Registered

    Join Date
    Aug 2006
    Location
    Westcountry, UK
    Posts
    862
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding or formula help

    [events]
    * Counter > 0
    + Counter < 10
    + Counter <> 3
    + Counter mod 2 = 1
    -Do stuff
    [/events]

  5. #5
    No Products Registered

    Join Date
    Nov 2006
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding or formula help

    Thanks foe the help. However, I must be doing something wrong. I get a syntax error when on the Counter mod 2=1 part. I am going to Insert > Compare the counter value > Clicking on mod > and typing in 2=1.Am I doing this in the wrong place?

    Thanks,
    Rick

  6. #6
    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,515
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Re: Coding or formula help

    Mod is an operator just as +,*,- and / are. The two operands of the mod operation are the counter's value and the number 2. Therefore you have to use compare two general values and on one side of it have the counter's value mod 2, and on the other side of it have 1.
    .:::.Joshtek.:::.

  7. #7
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Coding or formula help

    You sure you aren't putting an = sign anywhere?

  8. #8
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

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

    Re: Coding or formula help

    Hello and happy new Year ( never too late , right ?
    Now, what does the "mod" operator actually do ?
    ( my maths are terrible )

  9. #9
    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,515
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)

    Re: Coding or formula help

    Quote Originally Posted by therickman
    Hello and happy new Year ( never too late , right ?
    Now, what does the "mod" operator actually do ?
    ( my maths are terrible )
    Mod is short for modulo. To quote the Wikipedia article: "In computing, the modulo operation finds the remainder of division of one number by another."

    That means that n mod 2 will return 1 if it is an odd number and 0 if it is an even number. Using mod was fairly useful in the KNP days as it was a way to store more information in the score and lives in the days before global values/objects.

    http://www.google.co.uk/search?hl=en&q=1+mod+2+%3D
    .:::.Joshtek.:::.

  10. #10
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall Creator Pro

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

    Re: Coding or formula help

    thanks for the info, Joshtek !
    http://www.irregularstuff.com


Similar Threads

  1. INI Formula Help
    By MajorityCA in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 8th February 2009, 01:28 AM
  2. Node formula
    By nivram in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 17th December 2008, 06:50 AM
  3. Help with simple formula
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 15th September 2008, 12:41 PM
  4. Help with formula
    By LB in forum The Games Factory 2 - Technical Support
    Replies: 6
    Last Post: 13th June 2007, 02:13 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
  •