User Tag List

Results 1 to 7 of 7

Thread: Ran into a issues with IDs

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ran into a issues with IDs

    I have been making a evolve simulator game and I ran into a problem...

    This video show the run down of the bug...


    If you did not watch the video, what happens is that my creatures have different IDs.
    When the creature lays a egg the egg gets given the ID from the creature that laid it, for the most part it works, but, it sometimes does not...
    Sometimes It will randomly set the eggs ID to 0 or could do it for 3 eggs straight or just randomly... So if a creature labelled 13 lays a egg and this happens the egg would be 0. When its meant to be 13 and so on.

    The creature that hatches from this ID also gets given this ID... which causes issues.



    Aside from that bug, How would I add a letter to the ID of a creature that spawns from a egg? So its "Creature ID'13A'" not the default value which would just be 13 or something? I get syntax errors when I try to do this even when the counter is set as text.

    Thanks

    Edit:
    I forgot to mention that theses IDs use alterable values and counters.

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's no way for us to know what's going wrong with your program without you posting some source code. I recommend trying to isolate the bug by creating another test game that tries to do only the part of the logic that you are having trouble with. You might find that in making this test MFA you solve the problem on your own --- if not, you'll have a handy MFA you can post here so people can check what's wrong.

    If I understand correctly what you want in the second half of your post, you want alterable strings? Every Active has several of them. Even though it's a common trope in fusion tutorials, etc., you shouldn't be using invisible counters to aid with game logic; just create an invisible Active, name its alterable values, and use those. With the counter you are creating a heavyweight structure to perform the most basic of a computer's functionality, and counters have limits imposed on them to aid in their intended purpose, to display a value. Bundling local variables in Actives will keep things more organized anyway.

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is a little test mock-up I made.

    You will see in this the boxes values start at 2 when you add them so if you see any box with ID of 1 it bugged.

    Left click to add a box and hover over it to see its ID.

    So, you are saying its better to have a object that counts the IDs and what not? Instead of a counter?

    Thanks!
    Attached files Attached files

  4. #4
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was unable to add this but, I have added a more values such as speed, mutation, generations and what not. They all do the same thing, work for the most part then just break.
    I did notice when more then 2 spawn at once it bugs, but knowing this does not really solve anything because I can't do anything with this information.

  5. #5
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2016
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have worked out a patch. It's a patch and does not fully solve it and this patch does in-packed my creatures as such it will delete a bugged off-spring which means the creature loses its egg, no idea why I did not think of this...

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The reason why it wasn't working is actually pretty simple. You might have noticed that Fusion's events always apply to a selection of objects "en masse." So, if two objects reach Count Down 0 on the same frame, the event will apply to both of them, and an egg will be created at each of them. The problem is, when you reference ID 1("Active") as the thing to set ID 2 of the egg to, Fusion doesn't know which of the selected Active objects to use... it can only pick one.

    Luckily, Fusion now includes an easy "On each one of" loop that is great for doing something with objects one-by-one rather than en masse. I fixed the bugs and attached the MFA which should demonstrate how to use the loops (your old events are just disabled).
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export Module
    UltimateWalrus's Avatar
    Join Date
    Jul 2006
    Posts
    825
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also regarding the Counter, again it is better to use Counters for their intended purpose which is displaying a value to the player, not to keep track of a value that will be invisible to the player in the final build anyway. You will find that in a more complicated game, you'll have so many behind-the-scenes values that it would be crazy to create a different Counter object for every single one. It will be more disorganized, it will take up more memory, performance will be slower, and the values will be stored in a way that makes them better to look at, not better for your program to actually use internally. One example is the minimum/maximum values of the counter. Everything works better if you just use Alterable Values.

    I guess I feel the need to defend myself here, because using Counters for behind-the-scenes values is a very common trope. Note that you can always have a Counter display some object's alterable value... not to mention Clickteam's "debugger." Example attached.
    Attached files Attached files

Similar Threads

  1. RC3: 3 issues
    By Popcorn in forum Android Export Module Version 2.0
    Replies: 4
    Last Post: 12th February 2013, 02:48 PM
  2. Lag issues
    By EdibleWare in forum SWF/Flash Export Module Version 2.0
    Replies: 5
    Last Post: 1st March 2011, 11:56 AM
  3. avi issues help please! Thanks.
    By kreeddem in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 27th September 2010, 02:25 PM
  4. Moo issues
    By DJFuego in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 20th November 2006, 09:41 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
  •