Не плохо терь нет нужды создавать декорации и жрать его текстуры для замены юнита текстур (Хотя отрабатывает как декорация)
function SetWidgetTexure takes widget whichWidget, string texturePath, integer replaceableId returns boolean
/*Models can have textures with a Replaceable ID instead of a texture path.
The most common use of this is for team color and hero glow (Replaceable ID 1 & 2).
While there are natives to set a units team color, that's about all that is natively supported.
The Mountain Giant's War Club ability will change any texture on the caster that uses "Replaceable ID 32" to the texture of the targeted destructable.
While this allows us to modify ID 32, it's not enough and has some overhead.
If we can allow the user to change any ID, then we can switch the texture of any part of the model dynamically.
Of course this requires models to use Replaceable ID's instead of texture paths, so many vanilla models won't have uses other than custom team colors.
Perhaps a complete API to modify model data would be better, however this would be the easiest to implement.
There is already an internal function capable of doing this. However it requires a destructable as one of the paramaters, but I think it should be fairly easy to find a way to not require one.
The way I do it is by using a dummy destructable object (not handle) and switching it's texture, but there is probably a better way.*/
function GetEventDamageAttackType takes nothing returns attacktype
//In response to a damage event returns the attacktype (Spell, Hero, Chaos, etc) of the damage.
function GetEventDamageDamageType takes nothing returns damagetype
//In response to a damage event returns the damagetype (unkown, magic, normal, enhanced, etc) of the damage.
function GetEventDamageAbilityId takes nothing returns integer
//In response to a damage event returns the ability ID that caused the damage. This ability can be a damage spell (Flame Strike, Storm Bolt, etc) or an attack modifier ability (Cold Arrow, orb of fire, etc). Normal attack damage returns some safe default value such as 0.
function GetEventDamageUnmodified takes nothing returns real
//In response to a damage event returns the damage dealt to the unit before any modifications (armor, attacktype reduction, etc) were applied.
function GetEventDamageMana takes nothing returns real
//In response to a damage event returns the mana lost due to an active mana shield.
че ты придумываеш это зависит от сервера а не клиента.. например если поставить 10 lat означает что будет сервер отрабатывать 0.10 сек цикло для раздачи клиентам поэтому и растет трафик потребления
Вот код пример набросал
при старта игры создаю 2 тип state
а счетчик стал 2
потом при слздание DataUnit с привязка юнит создает нужное количесто статов
Вот набросок описал....
могу подругому сделать но не очень например array[(int(this) - 1) * TypeState.count + type] = 0
учитивая массив ограничено а хеш как обычно медленно работает
не я при старта игры создаю типов через структур и структура имеет static счетчик даного типа после чего из него создаем массив нужный количество ячеек но ругает
а не вносить операция
Astra, нет вот пример который не берет предмет если он не чужой игрок...
private function Trig_OrderToItem_Actions takes nothing returns nothing
local unit u = GetTriggerUnit()
local item it = GetOrderTargetItem()
if it != null and GetItemUserData(it) !=null then
if (GetPlayerId(GetOwningPlayer(u))+1) != GetItemUserData(it) then
call PauseUnit(u,true)
call IssueImmediateOrderById(u,851972)
call PauseUnit(u,false)
call StartSound( snd_Error )
call DisplayTextToPlayer(GetOwningPlayer(u), 0, 0, "Это не ваш предмет." )
endif
endif
endfunction
private function init takes nothing returns nothing
set ISS_trig_OrderToItem = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( ISS_trig_OrderToItem, EVENT_PLAYER_UNIT_ISSUED_TARGET_ORDER )
call TriggerAddAction( ISS_trig_OrderToItem, function Trig_OrderToItem_Actions )
endfunction
Вот и все... чтобы проверить уровень достаточно указать в РО уровень предмета и сравшиваеш через условие
» WarCraft 3 / Патч 1.29 вышел на основных серверах
RyanRO, Вот ссылка us.battle.net/forums/en/bnet/topic/20761878126?page=1 просто там старая ссылка стояла
» WarCraft 3 / [jass] Чем заменить type?
» WarCraft 3 / [jass] Чем заменить type?
Hate, и к тому же мне не нужен числа а нужен тип по который возврашает из него может несколько
Вот так работает
Ред. pro100master
» WarCraft 3 / Нужна модель? - Вам сюда!
» WarCraft 3 / Новые нативные функции в 1.29
Ред. pro100master
» WarCraft 3 / Новые нативные функции в 1.29
» WarCraft 3 / Новые нативные функции в 1.29
» WarCraft 3 / Призыв юнитов
» WarCraft 3 / На что влияет latency?
» WarCraft 3 / [Мемхак] Кто нить нашел адрес счетчик способности?
» WarCraft 3 / Почему у огненного дыхания пропало пламя?
» WarCraft 3 / Карты из стандартных кампаний
» WarCraft 3 / Есть здесь кто в формулах движения даммиков шарит?
» WarCraft 3 / Создание квеста в мультиплеере
» WarCraft 3 / Создание квеста в мультиплеере
» WarCraft 3 / Есть здесь кто в формулах движения даммиков шарит?
Ред. pro100master
» WarCraft 3 / [jass] Кроме констант как можно добавить в массив?
при старта игры создаю 2 тип state
а счетчик стал 2
потом при слздание DataUnit с привязка юнит создает нужное количесто статов
могу подругому сделать но не очень например array[(int(this) - 1) * TypeState.count + type] = 0
учитивая массив ограничено а хеш как обычно медленно работает
» WarCraft 3 / [jass] Кроме констант как можно добавить в массив?
а не вносить операция
» WarCraft 3 / Сложное время
» WarCraft 3 / Не знаю баг или нет
» WarCraft 3 / Как воссоединить две карты в одну?
» WarCraft 3 / Как сделать абилку для башни?
а 2 учи таймером
» WarCraft 3 / Кнопки мини-карты
» WarCraft 3 / Парящий тип передвижения и получаемый ими урон от АОЕ магии
» WarCraft 3 / Получение предмета