Retrieve player name (comparing 2 strings)

  • Is there any way in Kismet to compare 2 strings? I’ve looked around the internet and it seems that not only is there absolutely no way to do this outside of Unrealscript (as far as I know), but also no one seems to really require this functionality.

    I do, however.
    But I don’t know how to go about it.

    There are condition nodes for comparing booleans, integers, floats and even objects, but NOT for strings. UDK at its finest.
    Is there still any way for me to do it though?

    This is what I have set up at the moment.
    alt text

    It broadcasts the player’s name in text absolutely fine for testing purposes. But now I want to compare the player’s name to another string to see if they match and I really, really hope I’ve done a terrible job at looking for it because I can’t find a way.

  • U can’t without unrealscript.
    If you are only mapping and still require it, it’s likely that u should reconsider ur approach. I can’t even think of a single reason it would be useful.
    Hardcoding playernames for comparison in a map is disencouraged. Use the controller to compare players.

    But in general it is possible to compare strings in Kismet… if u write the Kismet-node in uscript first :P

  • @Hordy said in Retrieve player name (comparing 2 strings):

    But in general it is possible to compare strings in Kismet… if u write the Kismet-node in uscript first :P

    No such luck in the limited version used for making Chivalry custom maps I reckon.

    Perhaps I was taking a dumb approach to begin with.
    I can take the player name. Can I combine it with another string? (in Kismet only)
    Outputting "<PLAYERNAME>" is useless to me. Outputting “Hello <PLAYERNAME>, bla bla bla” would be perfect.
    It takes me 5 mins to do this in UE4. But with UDK I’m too stupid to find what I need.

    And even after everything I’d still like to try my original method to make the unique player comparison thing work. Extracting a playername is as insecure as it could possibly get but it was at least something that I finally got working, haha.
    I need something that allows the map to say “Hey, I know this player!” (not literally) and act accordingly like allowing this player to debug, activating various objectives remotely in case something breaks during testing phase.
    I could simply bind it to those logged in as an admin. Buuut - and I know this’ll sound shady - I’m not comfortable giving the admin pass to the select few players I intend to regularly test with. Especially because they will also often be testing when I’m not there.
    I trust them with the debugging tools that I will make in Kismet but since I don’t intend to update my map every single day for every tiny change I make, I won’t be constantly resetting my server or changing its admin pass to one only I know after every testing phase.
    In other words, the server running my map is also running 15 other maps on which I don’t want those players to have admin rights.

    Maybe if I keep uploading 2 versions. There would be AOCTO-Testmap_p and AOCTO-Testmap_debug_p. Only the latter allows players to use the debug keys but they don’t have to be logged in as admin to do so.
    Would that be even remotely convenient?

    The final solution I see (other than just letting go of my awkward methods entirely) is hidden stuff in the map like invisible buttons to give the instigator the ability to use those debug keys. Yeah… that probably is the worst idea yet. Needs to be reactivated after every respawn and anyone who cracks open the map sees how to do it.

  • Yes you can concatenate Strings using the ‘toString’ node in the ‘Misc’ section.

    If you rly must hardcode security passes is the map itself (the Kismet is visible to anybody), then use the steam id at least.

    @Rickvs said in Retrieve player name (comparing 2 strings):

    No such luck in the limited version used for making Chivalry custom maps I reckon.

    U can ship ur map with a custom mod. It’s just an additional file in ur map folder. However, experience won’t persist anymore.