User Tag List

Results 1 to 8 of 8

Thread: Cutscene creation: Whats wrong here?

  1. #1
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2015
    Location
    Central Oregon, USA
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Cutscene creation: Whats wrong here?

    So right now I'm trying to create a cutscene engine that runs on a counter, an INI, and as few events as humanly possible. So far it works, but for some reason the expression editor won't accept this expression that I'm giving it. I'm gonna go into more detail than I should here in case you guys have any better ideas.

    The INI file contains the scripting for the scene. Dialogue, Actions, ect. It's all in one group, with the items named something like "nameX = "blah"", with X being the stage of the scene. Fusion will read every event whos X is equal to the counter I mentioned, which advances when needed. For example, the dialogue.

    The ini will read:
    Name0 = "Ivan"
    Text0 = "Why did the chicken cross the road?"
    Name1= "Rex"
    Text1 = "To beat up the idiot making jokes about him, probably."
    Name2 = "Anna"
    Text2 = "...Aren't chickens female?"


    The counter starts at 0, so the game reads Name0 and Text0 first, so the dialogue box reads

    Ivan
    Why did the chicken cross the road?


    Each time the player presses "Enter", that counter goes up one. So, player presses enter, Counter +1, Counter now equals 1 and reads Name1 and Text1 instead, Dialogue box Displays Rex's line. Repeat one more, counter = 2, Box displays Anna's line.

    This works great for dialogue but now I'm trying sprite movement. I'm trying NOT to create events for each sprite, that would completely defeat the point. So, while the actions will have to be in separate events, I'm trying set it up so the events can discriminate between sprites.

    My current idea is to set an alterable string in each sprite, like their name. Alt. String A = "IVN", "REX," "ANA" ect. And use those strings as the names for the events in the INI.

    INI reads:
    IVN_ACT0 = 1
    REX_ACT1 = 3
    ANA_ACT2 = 2

    And all the sprites are in the "Player" qualifier. So, if conditions are met, Goup.Player does whatever, but still discriminates between sprites. Like Rex will only do Rex commands, ect ect.

    Can't set the conditions to the events to the Ini's properties for some reason so I wanna set each sprites Alt. Value to whatever the INI's value is whenever the counter advances, and use that as the conditions for the event. So the expression I want to use to set the Alt is:

    Val(GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + "_ACT" + Str$(value( "dialoguecounter" ) ) ) )

    But there lies the problem: The expression Editor won't accept it. Keeps saying it's a mix of strings and numbers, which I don't get. Yeah it has strings in the equation but the end result should ultimately be a number, wouldn't it?

    If anyone knows whats wrong here or has any better ideas of how I could tackle this, please let me know.

  2. #2
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Don't have a fusion here, but you are converting a val to a String inside a string?

    Change it to this

    Val(str$(GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + "_ACT" + Str$(value( "dialoguecounter" ) ) ) ))

    but you get an error since you have "_ACT" in there, and you can't change that to a number.

    str$((GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + "_ACT" + Str$(value( "dialoguecounter" ) ) ) )

    should work. to get the string you want

  3. #3
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2015
    Location
    Central Oregon, USA
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Opposite problem. I'm trying to get a value, not a string. The string inside the equation is the item I'm trying to get the value from in the INI.

    It might not matter though, while at work I had the idea to use strings instead of values anyways, gonna try that instead. though if anyone wants to try tackling this problem anyways, By all means, I'm still curious why this didn't work.

  4. #4
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    As Perry pointed out:

    Val(GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + "_ACT" + Str$(value( "dialoguecounter" ) ) ) )

    this is a mix of strings and numbers
    due to the presence of Val(...) that is a number, and "_ACT" + "Str$(value( "dialoguecounter" ) )" that are strings
    but the expression editor expects a number (or a string).


    This setup seems a little overconstructed,
    have you considered using a more structured database, like an array?
    (ex. Xn=step number | Y0=name | Y1=dialogue | Y2=player ....)

  5. #5
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    A Val is not possible, since you have the string "_ACT" in there. Once you remove that, that you can get a number)

    Val(GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + Str$(value( "dialoguecounter" ) ) ) )

    Like that.


    Quote Originally Posted by Dengarde View Post
    Opposite problem. I'm trying to get a value, not a string. The string inside the equation is the item I'm trying to get the value from in the INI.

    It might not matter though, while at work I had the idea to use strings instead of values anyways, gonna try that instead. though if anyone wants to try tackling this problem anyways, By all means, I'm still curious why this didn't work.

  6. #6
    Clicker Fusion 2.5 (Steam)

    Join Date
    Jan 2015
    Location
    Central Oregon, USA
    Posts
    64
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But why is it trying to use "_ACT" as a value? In this equation, it's being used to determine the INI item the value is going to be taken from, isn't it? I don't see why it would try to convert that to a value when it should just be taking the value from the named item.

    Sorry if I sound like I'm not listening, I just do NOT get how this equation is trying to get a value from _ACT.

    This setup seems a little overconstructed,
    have you considered using a more structured database, like an array?
    (ex. Xn=step number | Y0=name | Y1=dialogue | Y2=player ....)
    I Can NOT figure out arrays for the life of me, they seem way more complicated than this. This way seems kind of simple to me.

  7. #7
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    because you use VAL(......) in the beginning.
    So that means, you are Converting a string to a Value. if it was all numbers, then it's ok, but you have that word in there, so it will crash.

    Let me try something. or do you have the MFA where you are trying to make it work with?

    edit: I just copied the item in my editor, and need some more info... the GroupItemValue is from the Ini I guess?

  8. #8
    Forum Moderator

    Fusion 2.5 MacFusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleMac Export ModuleUniversal Windows Platform Export ModuleSWF Export ModuleInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)

    Join Date
    Dec 2013
    Location
    Watertown, WI
    Posts
    4,421
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    ok change it to

    Val(str$(GroupItemValue( "INI", "EVENT", Str$(Alterable String A( "Group.Player" ) ) + Str$(value( "dialoguecounter" ) ) ) ))

    And make SURE that "INI" is the name of the object.. if it's Upper/lower case, then you get an error as well

    I don't have all the items that you are using, but it works for me this way

Similar Threads

  1. can somebody see whats wrong here
    By bubba_damage in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 20th April 2010, 12:38 AM
  2. Text Box/Cutscene Help (Plus More!)
    By Smedwicks in forum File Archive
    Replies: 0
    Last Post: 9th November 2009, 03:57 AM
  3. whats wrong with this CT page?
    By jpcr in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 20th February 2009, 01:37 PM
  4. Cutscene Extentions?
    By Arnax in forum Multimedia Fusion 2 - Technical Support
    Replies: 8
    Last Post: 11th February 2008, 10:05 PM
  5. Lua object, whats wrong with what im doing?
    By firecraker180 in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 2nd September 2006, 08:33 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
  •