User Tag List

Results 1 to 6 of 6

Thread: Number of objects depending on counter

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2014
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Number of objects depending on counter

    Hello everyone,

    i have a problem displaying the correct number of player units depending on a counter. I have no idea how to solve that at the moment.

    I have a counter which displays the number of a specific unit. Let's say for example a mediaval warrior.
    In my game the player can recruit more units of this type. The total number of this medieval warrior ist stored in a counter.

    Example:
    If the counter is 2 = two objects of the medieval warrior need to appear in the game.

    Is there a chance to clone/duplicate an object during game depending on a counter value?
    Is there another way?

    I hope someone can help me! :-(

    Greetings
    Chily

  2. #2
    Clicker Fusion 2.5Android Export ModuleSWF Export Module
    Ziplock's Avatar
    Join Date
    Oct 2013
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you saying that the amount on the counter is the amount of those objects that need to appear?

    You could use a loop that runs as many times as the counter.

    If Counter <> 0:
    -> Start loop "create warrior" Value of Counter times

    On loop "create warrior":
    -> Create a warrior

    On loop "create warrior"
    + LoopIndex = Value of Counter - 1
    -> Set counter to 0

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2014
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the feedback.

    @Snail
    Is there such a function to create an object during gameplay at position x/y? Or something like: If Counter = x --> create object y?
    I do not know a function like this. In combination with the loop from Ziplock, this could be the solution.

    @Ziplock:
    "Are you saying that the amount on the counter is the amount of those objects that need to appear?"
    -> This is exactly what I'm trying to do!

    Greetings
    Chily

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Here is a simple example how to do something like that

    zelma_create_by_number.mfa

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2014
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wonderful!!
    Thanks all for your help. Especially Sparkman for your example.

    Really nice community here. ^^

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    Sparckman's Avatar
    Join Date
    Feb 2011
    Location
    Planet of the Kangaroos
    Posts
    1,396
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    You're welcome! and Welcome to the forum

Similar Threads

  1. [bug] COUNTER (number of decimals)
    By StingRay in forum Android Export Module Version 2.0
    Replies: 0
    Last Post: 9th April 2013, 12:27 PM
  2. Large number display in Counter Objects?
    By Benicle in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 7th December 2012, 09:46 AM
  3. number of purchases counter
    By lachmandoo in forum iOS Export Module Version 2.0
    Replies: 8
    Last Post: 2nd April 2012, 01:40 PM
  4. Counter not displaying proper number
    By jellytot in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 22nd January 2009, 09:11 AM
  5. [Bug?] Counter and fixed number of digits = 0
    By Tiles in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 23rd December 2007, 11:20 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
  •