Conditions and dialog

  • #1, by ke4Tuesday, 03. June 2014, 18:14 6 years ago
    I´m new here,
    I really tried, but I need your help.

    First thing, my condition doesn't work in the way i would like to. I have multiple action on my object. ( On click he says comment, he can use item on this object, when he use it, the comment on click should changes and now he can use on the object another item and then when he use it, the comment should be change again )
    So, i can't use just ELSE, this is what i did and didn't work.


    1. "leftclick" - if condition 1 is true - comment -end if
    2. "item dopped" - If condition 1 is true - action, change condition 1 to false, change condition 2 to true - end if

    3. "Leftclick" - if condition 2 is true - comment - end if
    4. "item dopped" - If condition 2 is true - action, change condition 2 to false, change condition 3 to true - end if

    3. "Leftclick" - if condition 3 is true - comment - end if
    4. "item dopped" - If condition 3 is true - action, change condition 3 to false, change condition 4 to true - end if

    5. "Leftclick: - if condition 4 is true - comment - end if


    But only first action happend.

    And the second thing, i did dialog with npc by the tutorial, but i click on him and nothing happens, my character just will came to npc.
    In my "leftclick" a have allowed object in characters. I actually don't understand how to start dialog. Is it action on npc with display text and after that calling a dialog?


    I know, this is a lot of things, but thank you very much!.

    Key Killer

    810 Posts


  • #2, by afrlmeTuesday, 03. June 2014, 18:34 6 years ago
    Could you post some screenshots please?

    Based on what you have said: I would have used a value instead of conditions. Conditions only have boolean values of true or false, whereas values have infinite possibilities.
    if value is 1
    do this...
    else
    if value is 2
    do this...
    else
    if value is 3
    do this...
    end if
    end if
    end if
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12

    Could you also give me a little rundown on what it is you are trying to do please?

    Imperator

    6846 Posts

  • #3, by ke4Tuesday, 03. June 2014, 19:11 6 years ago
    In my game in the first location you are burried, you can't walk just interact with object.
    You can click on nail - character tells comment. You have a keys, if you use them on the nail you pull up the nail litlle bit. Now if you click on the nail, character tells samething diferent, now you can use hands on nail and when you use hands your hands are free, then if you click on nail character tells something diferent.

    I didn't know, that you can have more than one else in if, I'll try to do it that way.

    Key Killer

    810 Posts

  • #4, by afrlmeTuesday, 03. June 2014, 20:08 6 years ago
    Ahh I see... you should only really include one instance of each action. All of your if queries should be performed inside of that action. The "leftclick" action for instance.

    If you were to add each of them exactly as you have in the screenshot instead of using else if then it would run through each of them without stopping because you would have changed to the next condition value before the actions had reached the if query for it. Hence the use of "else".

    Imperator

    6846 Posts

  • #5, by ke4Tuesday, 03. June 2014, 22:10 6 years ago
    Now it works perfectly,
    Thanks, I really appreciate how you are hepling to all here!
    Can you please help me with the second part too? ( I hope it's gonna be all )
    i belive, that it is simple but at the moment i feel lost.
    I made the action calling a dialog i just didn't see the options when i was looking for it before...
    But when dialog starts, my mouse disappears and when i click on something in dialog game quits.
    And i also didn't find option to align dialog bar to bottom, because there is no window in game resolution.

    Key Killer

    810 Posts

  • #6, by afrlmeTuesday, 03. June 2014, 22:57 6 years ago
    which version of vs are you using? & which operating system are you using? finally, are there any errors listed in the log files after it crashes?

    You should create the dialog box, buttons & assign the dialog fonts via your playable character. The actual dialogs should be created on the npc characters that you will be conversing with. In the section that you create & assign the dialog background, at the bottom of left hand column is a section for setting the position of the dialog box. The position should be game default resolution height - height of the dialog interface background. the position is set by top-left point of the background image.

    It should just work by you using the "start dialog" action part & calling a dialog of a character that is in the same scene as the current character. If not then it could be a bug in the build or something you have done wrong.

    Imperator

    6846 Posts

  • #7, by ke4Tuesday, 03. June 2014, 23:27 6 years ago
    Visionare 4 RC, windows 8,
    Error: Index out of bounds.
    ..\..\src\msw\window.cpp(576): 'SetFocus' failed with error 0x00000057 (parametr není správný.).

    Key Killer

    810 Posts

  • #8, by afrlmeTuesday, 03. June 2014, 23:43 6 years ago
    All looks about right from your screenshots. The bug I've no idea about... one of the vs dev team will probably know what that is.

    Imperator

    6846 Posts

Write post