I've been using this post as a guide to set up a way to rename combatants whenever you "capture" them and add them to your active group.

Here's what I've got right now:

new-name-nodes

Whatever I type in the input field seems to have no effect, as the name of the combatant before continues to be its name after this event. If I use the Set Combatant Name node to change the name to a set value, it works fine, so that leads me to believe something isn't correct with my setup or the value input dialogue node.

Any idea where I've gone wrong? I've tried quite a few things and can't seem to get it right.

Thank you!
  • I'd need to see the settings of the Value Input Dialogue and Set Combatant Name nodes. My first guess would be that you're using different variable keys in the 2 nodes, basically setting the name to an empty string (the variable not being set), which will reset to the original name.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Hey, thanks for getting back to me!

    Here's the setting for Set Combatant Name:
    set-combatant-name
    And here's the Value Input Dialogue:
    value-input-pt-1
    value-input-pt-2

    Let me if I can provide anything else that'd help you help me!
  • Hm ... looks correct.
    Is the name you input in the dialogue stored in the global variable afterwards? You can check that by selecting the _ORK game object in the scene (DontDestroyOnLoad objects), which will list all global variables in the inspector.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I just checked, it doesn't seem like it does. Here's a video so you can also see what's going on:





    I have had an issue with global variables not working in a battle event before as well... Any ideas on what's going wrong?
  • Hm, that's very strange ...
    I just did a quick test (although without capturing a combatant) with the same value input and name change setup and that worked fine.

    Do you have any other things (e.g. global events or custom scripts) using the newName global variable?
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I don't think so. I tried a couple different variable names and it still didn't work.

    This might not be related, but I noticed when I type into the value input dialogue, certain input keys still trigger. Like, if I type "p" -- my input key for pause -- the game will pause. This happens even when I check "UI Blocks Input" in the Base/Control > Input Keys > Key Settings
  • edited January 2021
    UI Blocks Input would only be used if the mouse cursor is over a GUI box, and even in a paused game, the variable should still be set correctly.

    Could you send me a small Unity test project with your setup? You can delete the Library folder in the Unity project before sending it to reduce the file size, e.g. zip it up and send me the link via PN or to contact@orkframework.com
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • I appreciate it -- just sent you an email.
  • For others running into the same issue (Value Input Dialogue not setting string variables), make sure to use a regular Unity input field (prefab) when using the new UI - ORK doesn't support TextMesh Pro input fields.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sign In or Register to comment.