User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 16 of 16

Thread: Use a string to refer to an object?

  1. #11
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What i meant write "1", "2" , "3" into the first paragraph of 3 different string objects and you can reference to them via a qualifier using a loop. "1" = "1" etc...
    Though i am not sure what you are actually trying to achieve. But you can select string objects based on their paragraphs that way.

    And you can have specific parts of a string as a condition or whatever, string parser or alike you can chop strings up the way you like.


    EDIT: Let me give you a quick example of selection actually, it might be a bit clearer to you: https://dl.dropbox.com/u/14962632/Pu...ringselect.mfa

    Just try 1,2,3 into the editbox to select strings

  2. #12
    Clicker Fusion 2.5 Developer

    Join Date
    Jul 2008
    Location
    UK
    Posts
    1,393
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    @Droberson:
    Although an MMF2 "Eval()" function would be great, my guess is that it wouldn't be worth the amount of time and effort it would take them, which could be better spent on other things.
    Also, such a function would almost certainly be abused - people would use it all over the place where it's not really needed (this thread being a perfect example), and then wonder why their game slowed to 10fps (there's no way such a function would be fast). Plus I can imagine there'd be issues with expressions containing references to extensions that may or may not be present or the right version.

    MMF2 was simply not designed to be very dynamic - it was designed to be simple. You can't evaluate expressions at runtime, you can't create objects by name without an extension, you can't define new variables at runtime without an extension, and there are still many options that don't allow you to enter an expression (eg. when checking for collisions, you can't enter the object names as strings), you can't define new object types at runtime, you can't modify object groups at runtime, etc.
    You can at least pick alterables/globals by index, and there's also the expression evaluator extension.

  3. #13
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Can't you add your string objects to a qualifier and spread a value to assign a runtime ID?

  4. #14
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by James View Post
    Can't you add your string objects to a qualifier and spread a value to assign a runtime ID?
    Runtime ID could be implemented using the alt string if you only need the paragraphs. But its much easier using foreach that does it without taking your altstring away. Depends rather on the case, I think value-add object could also be used to add some values to strings for easier selection.

  5. #15
    Clicker Multimedia Fusion 2SWF Export Module
    Tsun's Avatar
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    98
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Goddangit, I was thinking of the event backwards, I was going for "if (qualifier) equals ID" and it was impossible, but the same thing works as "if ID equals (qualifier)" lol.

    Skyhunter's solution might very well work after all, but I got to run for train right now. I'll try it when I get home and post how it goes.


    Edit:
    Well, I can't get it to work. I'm not sure why, I'm doing the exact same thing as Skyhunter's example except I'm using an event like so:

    Set text to: paragraph$( "Group.Dialogue", <Alterable Value>)

    It always uses the first String object in the group, even though it doesn't match the ID in the conditions. Not sure why, and I'm kind of too tired at the moment to think much about this anymore. I guess it can't pick items from a group in the event like that.

  6. #16
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleiOS Export ModuleSWF Export Module
    Skyhunter's Avatar
    Join Date
    Jan 2007
    Location
    Croatia
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You must have the foreach loop like in the example because it only picks out single instances to do the check and also any action with that particular instance if its correct. If you still have problems post an example and ill help you out.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Set edit box text to string$("string object") causes long delay
    By MJK in forum XNA Export Module Version 2.0
    Replies: 4
    Last Post: 22nd August 2012, 02:58 PM
  2. FPS drops when the Active object crossing into the String object.
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 9th June 2012, 04:22 PM
  3. How to have a video in the app without having to refer to file?
    By Outcast in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 3rd March 2012, 01:43 AM
  4. Is it possible to refer to a global value in a list objects
    By Wolkam in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 30th January 2012, 03:56 PM
  5. [BUG] String object does not retain its string
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 16th April 2011, 11:18 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
  •