i have been searching for this and have come to no conclusion on how to get it, basically what i am trying to do is get what key is pressed in a ASCII value for a string, so far i cant find anything even that remotely resembles this, any help would be greatly appreciated
The best thing I can think of for this is to write a function using a switch action with conditions for each possible (or desired) key press. It would be a bit tedious to write but it should work. Use a Key preset for a parameter, and have the switch depend on that key. Then go through a condition for each and every key, returning the string value you want.
Well, if you want to get the key and not an integer, you would have to do as Bashar said and create a function with key preset as the parameter with a switch action that will return text depending on the key code of the pressed key. The attached map should be what you want.
Since you can convert a string to text, I just changed the functions return type to string, and changed all the returns in the switch to string, hope that helps :)
Edit: Lol this let me remove a String Array that was 98 in size XD
Edit 2: So it seems that my editor doesnt have Text to String? not quite sure why but ill look into it
Strings are primitive data types, whereas text values are Blizzard's doing. Snappybean said it right. Text has formatting, whereas a string is, well, a string lol.
From my experience in making text editing software, converting a text value into a string is harder than you would think. Each letter is an object, not just a normal string output. Each of those letters has no particular data, just a color and shape. The font also has stuff to do with it. That is much more difficult to convert back to raw data than you would think... (Well it is not that difficult, but the side effects and exceptions that would be thrown would cost more than the result)
It is a minor inconvience for us, but actually anything that would use text to string formatting would be going down roads that Blizzard does not support, such as getting the name of a player.
Ive been working on a UI project to allow players to rebind a hot-key in game, i feel that this is something many might fine extremely valuable. ill upload my progress so far, the only thing i am trying to seek out right now is how to detect when a player is "Aiming an ability" if i could get that trigger it would allow me to Finnish making it so you can update tool tips on a "Dummy Ability" etc, linking skills i am not to worried about, i can either go about the image by creating a transparent dialog for the button icons since you cant use catalogs to re-write a face icon (Small Annoyance) but it could be something valuable to RPG makers if anyone is interested in looking at it
i have been searching for this and have come to no conclusion on how to get it, basically what i am trying to do is get what key is pressed in a ASCII value for a string, so far i cant find anything even that remotely resembles this, any help would be greatly appreciated
The best thing I can think of for this is to write a function using a switch action with conditions for each possible (or desired) key press. It would be a bit tedious to write but it should work. Use a Key preset for a parameter, and have the switch depend on that key. Then go through a condition for each and every key, returning the string value you want.
Events
UI - Player Any Player presses None key Down with shift Allow, control Allow, alt Allow
Local Variables
keyPressed = (Key Pressed) <Key>
string = (String((Integer(keyPressed)))) <String>
Actions
UI - Display ("The key value is " + (Text(string))) for (All players) to Subtitle area
Is this what you are trying to do?
that is exactly what i was looking for, thank you very much
Only thing that makes it kind of weird now is it states a integer value, but this defiantly puts me on the right track
Well, if you want to get the key and not an integer, you would have to do as Bashar said and create a function with key preset as the parameter with a switch action that will return text depending on the key code of the pressed key. The attached map should be what you want.
this is extremely useful, i would think that this should be made into a library item so other members can enjoy this just as much
Edit: the only downfall is blizzards doing. that you cant convert text to string :-(
Since you can convert a string to text, I just changed the functions return type to string, and changed all the returns in the switch to string, hope that helps :)
absolutely perfect, thank you so much
Edit: Lol this let me remove a String Array that was 98 in size XD Edit 2: So it seems that my editor doesnt have Text to String? not quite sure why but ill look into it
The editor has String to Text, but not Text to String.
I believe this is because the text data type allows for formatting, while strings do not.
Strings are primitive data types, whereas text values are Blizzard's doing. Snappybean said it right. Text has formatting, whereas a string is, well, a string lol.
From my experience in making text editing software, converting a text value into a string is harder than you would think. Each letter is an object, not just a normal string output. Each of those letters has no particular data, just a color and shape. The font also has stuff to do with it. That is much more difficult to convert back to raw data than you would think... (Well it is not that difficult, but the side effects and exceptions that would be thrown would cost more than the result)
It is a minor inconvience for us, but actually anything that would use text to string formatting would be going down roads that Blizzard does not support, such as getting the name of a player.
Great to be back and part of the community again!
Ive been working on a UI project to allow players to rebind a hot-key in game, i feel that this is something many might fine extremely valuable. ill upload my progress so far, the only thing i am trying to seek out right now is how to detect when a player is "Aiming an ability" if i could get that trigger it would allow me to Finnish making it so you can update tool tips on a "Dummy Ability" etc, linking skills i am not to worried about, i can either go about the image by creating a transparent dialog for the button icons since you cant use catalogs to re-write a face icon (Small Annoyance) but it could be something valuable to RPG makers if anyone is interested in looking at it