Добавлен
    function CreateTexttag takes player pl, integer red, integer green, integer blue, string st, real x, real y, real z returns nothing
        local texttag tt  = CreateTextTag()

        call SetTextTagText(tt, st, 0.023)
        call SetTextTagPos(tt, x, y, z)
        call SetTextTagColor(tt, red, green, blue, 255)
        call SetTextTagVisibility(tt, (GetLocalPlayer() == pl))
        call SetTextTagPermanent(tt, false)
        call SetTextTagVelocity(tt, 0.0, 0.03)

        call SetTextTagLifespan(tt, 3.0)
        call SetTextTagFadepoint(tt, 0.0)
      
        set t  = null
        set tt = null
    endfunction
SetTextTagPermanent(texttag, boolean)
SetTextTagLifespan(texttag, real)
SetTextTagFadepoint(texttag, real)
Нужно ли удалять texttag после вышеуказанной функции CreateTexttag(...)? Насколько я понял, функция SetTextTagLifespan(...) отвечает за время жизни texttag'a, значит ли это, что после заданного времени texttag удалится сам (как юниты)?
Какие данные нужно ввести в эту функцию, чтобы texttag двигался и исчезал так же, как и у BLIZZARD это работает с наградой за убийство, критическим ударами и предметами "Вязанка дров" и "Счастливая монетка"?

Принятый ответ

Нужно ли удалять texttag после вышеуказанной функции CreateTexttag(...)
Нет, Lifespan с этим справится сам.
Какие данные нужно ввести в эту функцию, чтобы texttag двигался и исчезал так же, как и у BLIZZARD это работает с наградой за убийство, критическим ударами и предметами "Вязанка дров" и "Счастливая монетка"?
осторожно, инглиш
Gold Text
Floating Text - Create floating text that reads (+ + Gold) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Lumber Text
Floating Text - Create floating text that reads (+ + Lumber) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (0.00%, 78.00%, 31.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Bounty Text
Floating Text - Create floating text that reads (+ + Bounty) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
"miss" Text
Floating Text - Create floating text that reads miss at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Critical Strike
Floating Text - Create floating text that reads (CriticalStrike + !) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Shadow Strike Text
Floating Text - Create floating text that reads ShadowStrike at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (62.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Mana Burn Text
Floating Text - Create floating text that reads ManaBurn at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (32.00%, 32.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00

Показан только небольшой набор комментариев вокруг указанного. Перейти к актуальным.
1
15
7 лет назад
Отредактирован Cheezie
1
Нужно ли удалять texttag после вышеуказанной функции CreateTexttag(...)
Нет, Lifespan с этим справится сам.
Какие данные нужно ввести в эту функцию, чтобы texttag двигался и исчезал так же, как и у BLIZZARD это работает с наградой за убийство, критическим ударами и предметами "Вязанка дров" и "Счастливая монетка"?
осторожно, инглиш
Gold Text
Floating Text - Create floating text that reads (+ + Gold) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Lumber Text
Floating Text - Create floating text that reads (+ + Lumber) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (0.00%, 78.00%, 31.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Bounty Text
Floating Text - Create floating text that reads (+ + Bounty) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
"miss" Text
Floating Text - Create floating text that reads miss at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Critical Strike
Floating Text - Create floating text that reads (CriticalStrike + !) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Shadow Strike Text
Floating Text - Create floating text that reads ShadowStrike at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (62.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Mana Burn Text
Floating Text - Create floating text that reads ManaBurn at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (32.00%, 32.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Принятый ответ
0
21
7 лет назад
0
AlexSan:
Нужно ли удалять texttag после вышеуказанной функции CreateTexttag(...)
Нет, Lifespan с этим справится сам.
Какие данные нужно ввести в эту функцию, чтобы texttag двигался и исчезал так же, как и у BLIZZARD это работает с наградой за убийство, критическим ударами и предметами "Вязанка дров" и "Счастливая монетка"?
осторожно, инглиш
Gold Text
Floating Text - Create floating text that reads (+ + Gold) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Lumber Text
Floating Text - Create floating text that reads (+ + Lumber) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (0.00%, 78.00%, 31.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 2.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Bounty Text
Floating Text - Create floating text that reads (+ + Bounty) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 86.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 54.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
"miss" Text
Floating Text - Create floating text that reads miss at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 3.00
Floating Text - Change the fadepoint of (Last created floating text) to 1.00
Critical Strike
Floating Text - Create floating text that reads (CriticalStrike + !) at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (100.00%, 0.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Shadow Strike Text
Floating Text - Create floating text that reads ShadowStrike at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (62.00%, 100.00%, 0.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
Mana Burn Text
Floating Text - Create floating text that reads ManaBurn at (Center of (Playable map area)) with Z offset 0.00, using font size 10.00, color (32.00%, 32.00%, 100.00%), and 0.00% transparency
Floating Text - Set the velocity of (Last created floating text) to 72.00 towards 90.00 degrees
Floating Text - Change permanent state of (Last created floating text) to Disable
Floating Text - Change the lifespan of (Last created floating text) to 5.00
Floating Text - Change the fadepoint of (Last created floating text) to 2.00
А что за Баунти текст?
0
15
7 лет назад
0
ScopteRectuS:
AlexSan:
А что за Баунти текст?
За убийство крипов нейтральных.
0
16
7 лет назад
0
Но ведь эти функции стандартные, описание есть прямо в редакторе карт.
1
27
7 лет назад
Отредактирован MpW
1
объяснения
удалять не нужно так как есть для этого специальные команды, которые задают время длительности жизни тексттага.
function TextTag takes unit u, string text returns texttag
local texttag t = CreateTextTag() //создаем текстаг
//скорость изменения координат xvel на оси х, yvel на оси у
local real xvel = 60 * 0.071 / 128 * Cos(70 * (3.14159/180))
local real yvel = 60 * 0.071 / 128 * Sin(70 * (3.14159/180))
call SetTextTagPermanent(t, false) //делаем постоянным
call SetTextTagText(t, text,12 * 0.023 / 10) //изменяем содержания текста, размер букв текста
call SetTextTagPosUnit(t, u, 0) //устанавливаем текстаг над юнитом и задаем высоту. Вместо этой функции можно заюзать SetTextTagPos - над точкой, тогда координаты придется вводить вместо юниита 
call SetTextTagVelocity(t, xvel, yvel) //устанавливаем скорость всплытия текста, короче эта функция отвечает за то, чтобы текст влетал вверх, как это делает при убийстве юнитов или крит и др.
call SetTextTagFadepoint(t, 0.00)  
call SetTextTagLifespan(t, 2.5) 
return t
endfunction
SetTextTagPermanent - сделать ли постоянным. постоянному текстагу нельзя будет установить время жизни. Нельзя будет сделать прозрачным или невидимым. И многие другие фишки, так как на все Permanent не проверял
Функция SetTextTagLifespan отвечает за длительность исчезновения. (Оптимально 1-3 сек). время жизни после которого исчезнет и удалиться.
функция SetTextTagAge - с какого времени начинается исчезновение. (0, для того что бы сразу). Удаляется после истекшего времени я не знаю.
Функция SetTextTagFadepoint - с какого времени начинается исчезновение, текст с каждой секундой становится все более прозрачным, и затем исчезает. (0, для того что бы сразу). Удаляется после истекшего времени я не знаю.
Функция SetTextTagVisibility - сделать текстаг видимым можно через GetLocalPlayer как в ShowTextTagForceBJ
SetTextTagColorBJ - изменяем цвет и прозрачность
SetTextTagSuspended - я не знаю что это за функция
вроде скину карту, ничего в ней особенного, но в ней проверял. возможно ошибаюсь с SetTextTagLifespan, SetTextTagFadepoint, SetTextTagAge. Проверить можно таймером и переменной не удалился ли текстаг, а вот исчезновение у некоторых команд разное кажись
Загруженные файлы
4
16
7 лет назад
4
Для продвинутых:
тексттаги не являются настоящими агентами и существуют на компе отдельно от прочего, как и молнии, например. их можно создавать в локальном коде, их не нужно нуллить.
Показан только небольшой набор комментариев вокруг указанного. Перейти к актуальным.
Чтобы оставить комментарий, пожалуйста, войдите на сайт.