Custom console function
Hello all !
I have a little problem, I'm unable to create a console command with parameters inplementable in blueprints ... I know how to create them without being in the console, how to make them in the console and BP without parameter, but when I had one the function isn't compilable ... It may be something like this, but it doesn't want to compile ...
I tried to replace FString with FString&, same error, I tried to add virtual, it says I shouldn't use virtual,
Please, it would be for something like "kick john" and john go out ...
Thank you for reading !
asked May 09 '16 at 08:52 PM in C++ Programming
Looking at the documentation on the Console Manager makes it look like the Exec-style of console commands may be deprecated. That said, it also lead me to an answer: If you want arguments, you can use a function like this:
Then you can either enforce that only one player is given (e.g. not kick anyone and report an error if multiple players are specified) or iterate over the list kicking each player in turn.
For reference, you might also look at the information for IConsoleManager::RegisterConsoleCommand and/or FAutoConsoleCommands, since those appear to be the preferred way of setting up console commands. I wasn't able to find quite all the documentation I'd like for them (esp. on the FConsoleCommandDelegate and related structures), but a quick "Go to definition" in Visual Studio let me infer what I needed.
Please let me know if this helps!
answered May 10 '16 at 12:19 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here