Hello there. I discovered an easy way how to simply get "Key pressed" into an string. (Hope im the first to post it :P)
So im going to use it to create a decent trigger system for writing in dialogs.
I attached my map so you can use it and skip all this. If you decide to use it, please give some credit where due :) Scrold down if you want to know the trick.
About my map:
I developed a decent system for people to use. What it does is that when you click with your mouse on the area where the text is(writing box), it starts flashing/pulsing at the end with " I " to let you know its active. Then when you press a key, it will write into the box. If you click on another box, it will active that one instead. :) Supports cappital letters (while holding down shift) and spaces.
How to configure my system:
1 In the directory "parameters" Set number of texts to the number of writing boxes you want to have, players to the number of players that will use it. Dont forget to change the range of all variables to the corresponding numbers.(Set to 3 and 5 by default). Cooldown is a parameter that sets the time between the " I " flasing at the end and set the minimum time between box-activations (There is a small cooldown after activating a box before you can activate another one, you will not notice it in practise) String lenght is the maximum lenght the system will let you write in one box.
2 In the directory "dialog" Open up trigger init and do whatever you want with that dialog. Please note these things. The images I created there are only graphical, and not system needed. Labels are only graphical output of the written text. Buttons there, are the activation area. (I need to stress out that for practice use, the button should be right under the label and image, if its not, then you wont be able to activate the box and write in it.) When you see how I done it I think you will know how to make your own or more boxes,
3 When your done, and you want to end the writing cycles, just set the variavle "Active text" to 0 for the corresponding player AND restart the cooldown timer(Pulsing timer/cooldown) for the corresponding player. You have to create your own trigger/button or whatever for that for that.
4 Profit. Written texts are stored in "writed string-save" Array parameters are(Player , number of the box)
If you want to make your own system, here is the core basic you need to know:
Folow these exactley these steps.
-1. Create a Trigger.
-2. Set events to Key pressed.
-3. Create a local variable. Name it integer catcher. Set the type to -Preset and Key.
-4 New action. Set "integer catcher" to Key pressed.
(important part inc)
-5 Now, change "integer catcher"s type from -Preset/Key to integer. (it will change the variable type, but, it will still be set to "key pressed")
-6 Add new action: Text message. Set the text to: Convert integer to text, and set the value to "integer catcher".
Result? If you now run this map, and press any key, you will get a text message with an number.
This number corresponds to the key you pressed. Each key on the keyboard has its own number.
-7 Create a varriable, name it ASCI. Set its type to string. Make it a constant and paste this in it "ca0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ "
(including that gap at the end and without "")
-8 New action : If then else.
If: Within bounds(parameters: 3<=integer catcher<=39)
Then: New action. Text message. Set the text to: Convert string to text. Now set the value to Substring (parameters: ASCI , integer catcher , integer catcher).
Fin. Now, if you press a key, it will tell you the number of it, AND write the key you pressed.
I think you can do others stuff on your own.(like storign it in a string value etc ..)
If you find any bugs/issues let me know. Feel free to ask if I didint explain something good. (PS:sorry for grammar mistakes :P)
Hello there. I discovered an easy way how to simply get "Key pressed" into an string. (Hope im the first to post it :P) So im going to use it to create a decent trigger system for writing in dialogs.
I attached my map so you can use it and skip all this. If you decide to use it, please give some credit where due :) Scrold down if you want to know the trick.
About my map:
I developed a decent system for people to use. What it does is that when you click with your mouse on the area where the text is(writing box), it starts flashing/pulsing at the end with " I " to let you know its active. Then when you press a key, it will write into the box. If you click on another box, it will active that one instead. :) Supports cappital letters (while holding down shift) and spaces.
How to configure my system:
1 In the directory "parameters" Set number of texts to the number of writing boxes you want to have, players to the number of players that will use it. Dont forget to change the range of all variables to the corresponding numbers.(Set to 3 and 5 by default). Cooldown is a parameter that sets the time between the " I " flasing at the end and set the minimum time between box-activations (There is a small cooldown after activating a box before you can activate another one, you will not notice it in practise) String lenght is the maximum lenght the system will let you write in one box.
2 In the directory "dialog" Open up trigger init and do whatever you want with that dialog. Please note these things. The images I created there are only graphical, and not system needed. Labels are only graphical output of the written text. Buttons there, are the activation area. (I need to stress out that for practice use, the button should be right under the label and image, if its not, then you wont be able to activate the box and write in it.) When you see how I done it I think you will know how to make your own or more boxes,
3 When your done, and you want to end the writing cycles, just set the variavle "Active text" to 0 for the corresponding player AND restart the cooldown timer(Pulsing timer/cooldown) for the corresponding player. You have to create your own trigger/button or whatever for that for that.
4 Profit. Written texts are stored in "writed string-save" Array parameters are(Player , number of the box)
If you want to make your own system, here is the core basic you need to know: Folow these exactley these steps.
-1. Create a Trigger.
-2. Set events to Key pressed.
-3. Create a local variable. Name it integer catcher. Set the type to -Preset and Key.
-4 New action. Set "integer catcher" to Key pressed.
(important part inc)
-5 Now, change "integer catcher"s type from -Preset/Key to integer. (it will change the variable type, but, it will still be set to "key pressed")
-6 Add new action: Text message. Set the text to: Convert integer to text, and set the value to "integer catcher".
Result? If you now run this map, and press any key, you will get a text message with an number. This number corresponds to the key you pressed. Each key on the keyboard has its own number.
-7 Create a varriable, name it ASCI. Set its type to string. Make it a constant and paste this in it "ca0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ " (including that gap at the end and without "")
-8 New action : If then else.
If: Within bounds(parameters: 3<=integer catcher<=39)
Then: New action. Text message. Set the text to: Convert string to text. Now set the value to Substring (parameters: ASCI , integer catcher , integer catcher).
Fin. Now, if you press a key, it will tell you the number of it, AND write the key you pressed. I think you can do others stuff on your own.(like storign it in a string value etc ..)
If you find any bugs/issues let me know. Feel free to ask if I didint explain something good. (PS:sorry for grammar mistakes :P)