• Hey! Register here to create your account, engage with the community, and talk about what is new!

Action Bar Animation

EvilsSouls

Forum adept
Overlord
Joined
Apr 16, 2021
Messages
208
Reaction score
18
I don't understand how i can do that with the action bar, like it first is:

"I" than
"I " after that
"I d" and so forth until there stants "i don't understand"

So that it looks like it is getting typed in the action bar
 
Solution
You can create a function that will allow you to do this with any text, simply set a variable called "dialogue" before you call the function and it will display the text in the action bar, for example:

Set Variable (dialogue = "Hello!") >> Call Function(Action Bar Text)

Then, make a function called Action Bar Text.

Function(Action Bar Text) >> Player Action: Send Message(dialogue)

If you've set this up all correctly, when you join the game and trigger the call function then a message with "Hello!" should be sent in chat.

Next up, creating the actual system. Firstly convert the text to a list using Set Variable: Split Text(diagList, dialogue, (/txt [])), using the /txt [] trick Prince mentioned. Then get the length of...

Requals

Disabled
Overlord
Joined
Sep 8, 2020
Messages
0
Reaction score
148
split the text with /txt [] to make a list and then trim that list from 0 or whatever to a var which you increment every (NUMBER) ticks, then join that text
 

General_Mudkip

Retired Moderator
Overlord
Joined
Sep 6, 2020
Messages
362
Reaction score
95
You can create a function that will allow you to do this with any text, simply set a variable called "dialogue" before you call the function and it will display the text in the action bar, for example:

Set Variable (dialogue = "Hello!") >> Call Function(Action Bar Text)

Then, make a function called Action Bar Text.

Function(Action Bar Text) >> Player Action: Send Message(dialogue)

If you've set this up all correctly, when you join the game and trigger the call function then a message with "Hello!" should be sent in chat.

Next up, creating the actual system. Firstly convert the text to a list using Set Variable: Split Text(diagList, dialogue, (/txt [])), using the /txt [] trick Prince mentioned. Then get the length of that list using Set Variable: Get List Length(lLength, diagList). This will tell us how many characters are in the text. So all in all, you should be left with:

Function(Action Bar Text) >> Set Var: Split Text(diag List, dialogue, "") >> Set Var: Get List Length(lLength, diagList)

We'll have to use a Repeat: Multiple Times to achieve that scrolling effect. Set up a Repeat: Multiple Times(i, lLength) with a Control: Wait(1) in it. Then we'll trim the original text we're given so that only certain characters are shown, using Set Var: Trim Text(toSend, dialogue, 1, i). This will set toSend to the trimmed version of dialogue, which has been trimmed to the characters between 1 and i. This means that the first iteration will be 1 and i=1, so toSend will be set to "H", second iteration will be 1 and i=2, so toSend will be set to "He", etc. Finally we just send this as an action bar using Player Action: Send Action Bar Message(toSend). Here's what your code should look like:

Function(Action Bar Text) >> Set Var: Split Text(diag List, dialogue, "") >> Set Var: Get List Length(lLength, diagList) >> Repeat: Multiple Times(i, lLength) [[ Control: Wait(1) >> Set Var: Trim Text(toSend, dialogue, 1, i) >> Player Action: Send Action Bar Message(toSend)]]

Or you can always grab a template from the code vault.

Apologies for the wall of text, I wanted to explain the system in full. If you have any further questions or critiques of my system then feel free to let me know :) Hope this helps!
 
Solution
Top Bottom