18

» WarCraft 3 / Имя текстурки

Lord_Tomat:
понял, эта картинка лежит в самом FrozenThrone.exe, просто любой мощной программой для открытия архивов открываешь и ищешь.
Загруженные файлы
18

» WarCraft 3 / Магия WE

MATRITSA:
чтобы вызвать прыжок нужно написать "call jump (прыгающий юнит, юнит-цель)"
Не забудь поставить равкод твоего дамми юнита для стомпа (я там комментарий оставил)
Для сохранения нужен JNGP
Саму наработку кидай в кастом код карты
globals
    hashtable hash = InitHashtable()
    real jumpSpeed = 400 //Здесь можно задавать скорость прыжка
    real jumpDamage = 100 //Наносимый урон
endglobals

function RemoveStomp takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit u = LoadUnitHandle(hash, GetHandleId(t), StringHash("stomp"))
    call RemoveUnit(u)
    call FlushChildHashtable(hash, GetHandleId(t))
    call DestroyTimer(t)
    set t = null
    set u = null
endfunction

function jumpMove takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit u = LoadUnitHandle(hash, GetHandleId(t), StringHash("u"))
    local unit target = LoadUnitHandle(hash, GetHandleId(t), StringHash("target"))
    local unit stomp
    local location pU = GetUnitLoc(u)
    local location pTarget = GetUnitLoc(target)
    local real x = GetLocationX(pU) + jumpSpeed*0.02 * Cos(AngleBetweenPoints(pU, pTarget) * bj_DEGTORAD)
    local real y = GetLocationY(pU) + jumpSpeed*0.02 * Sin(AngleBetweenPoints(pU, pTarget) * bj_DEGTORAD)
    call SetUnitFacing(u, AngleBetweenPoints(pU, pTarget))
    if ((IsUnitInRange(u, target, 72) == true) or (GetUnitState(u, UNIT_STATE_LIFE) <= 0)) then
        //Там где 'hfoo' это равкод твоего дамми юнита который будет стомп юзать
        set stomp = CreateUnitAtLoc(GetOwningPlayer(u), 'hfoo', pU, 0)
        call IssueImmediateOrder(stomp, "stomp")
        call UnitDamageTargetBJ( u, target, jumpDamage, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNIVERSAL )
        call SetUnitTimeScale(u, 1)
        call SaveUnitHandle(hash, GetHandleId(t), StringHash("stomp"), stomp)
        call DestroyEffect(LoadEffectHandle(hash, GetHandleId(t), StringHash("effect")))
        call TimerStart(t, 5.00, false, function RemoveStomp)
    else
        call SetUnitPosition(u, x, y)
    endif
    call RemoveLocation(pU)
    call RemoveLocation(pTarget)
    set t = null
    set u = null
    set stomp = null
    set target = null
    set pU = null
    set pTarget = null
    set x = 0
    set y = 0
endfunction

function jump takes unit u, unit target returns nothing
    local timer t = CreateTimer()
    local effect e
    //Это спеэффект который прикрепится к твоему юниту
    set e = AddSpecialEffectTarget("Abilities\\Spells\\Undead\\Darksummoning\\DarkSummonTarget.mdl", u, "origin")
    //================================================
    call SaveEffectHandle(hash, GetHandleId(t), StringHash("effect"), e)
    call SetUnitTimeScale(u, 0)
    call SaveUnitHandle(hash, GetHandleId(t), StringHash("u"), u)
    call SaveUnitHandle(hash, GetHandleId(t), StringHash("target"), target)
    call TimerStart(t, 0.02, true, function jumpMove)
    set t = null
    set e = null
endfunction
18

» WarCraft 3 / Как пользоваться нативкой UnitHasBuffsEx?

DracoL1ch:
ну так и пользоваться, передаешь, какого типа бафы интересуют, она возвращает тру, если таких не ноль
а первые два аргумента boolean что значат?
18

» WarCraft 3 / Магия WE

MATRITSA:
что вообще должна делать эта способность триггерная? Чтобы я знал что делать
18

» WarCraft 3 / Как пользоваться нативкой UnitHasBuffsEx?

Hate:
вам для чего
если не ошибаюсь, нативка позволяет проверять наличие определенных типов бафов
18

» WarCraft 3 / Магия WE

MATRITSA:
мне нужно что юнит не удалялся в переменой udg_Targer 0
Я выше написал магия ве какимто раком юнит из Target 0 в TrigerUnit перекачевряжылся
я могу лешыть проблему добавлением еше одного отряда но я хочю в проблеме разабраца
кастыли могут и помочи отсрочить неизбежное которое потом тока усилица
здесь всё очень запутанно, лучше такие вещи писать на jass
18

» WarCraft 3 / Магия WE

MATRITSA:
я так и не понял что именно не работает? Сижу смотрю и не могу разобраться в этой путанице
MATRITSA:
короче, скажи что должны делать все эти триггеры. Я напишу одну функцию
18

» WarCraft 3 / Магия WE

MATRITSA:
в этот куске кода как тока выполнелоси вот это условие
if ( Trig_Kenpatchi_Rivok_1_Func001Func005C() ) then
стартует стан наносица дамаг и удаляеца Пустышка Исполизуещися как Двигатели для ЮНита в переменой TrigerUnitMass
ох... Кинь скрины триггеров в GUI, не надо переводить триггеры в JASS
18

» WarCraft 3 / Магия WE

MATRITSA:
происходить следушия
if ( Trig_Kenpatchi_Rivok_1_Func001Func005C() ) then
call TriggerExecute( gg_trg_Stan2 )
call DisplayTextToForce( GetPlayersAll(), GetUnitName(udg_TrigerUnit) )
call UnitDamageTargetBJ( udg_TrigerUnitMass[udg_Index], udg_Target0[udg_Index], ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_TrigerUnitMass[udg_Index], true)) * 30.00 ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_MAGIC )
call RemoveUnit( udg_TrigerUnit )
Вот на этом куске кода udg_Target0[Index] становица перезаписоваеца в udg_TrigerUnit
не совсем понял что делает этот триггер (код нечитабелен), но одно я нашёл. Ты убиваешь юнита сразу как даешь приказ кастовать стомп.
Увеличь в UnitApplyTimedLifeBJ с 0.01 хотябы до 3.00
18

» WarCraft 3 / Магия WE

MATRITSA:
все работает нормалино если вот эту команду удалить
call IssueImmediateOrder( GetLastCreatedUnit(), "stomp" )
кинь код в нормальном виде позырю на твой баг
18

» WarCraft 3 / Магия WE

у меня ща глаза сломаются, кинь код нормально, т.е пишешь сначала "((код" далее переходишь на новую строку, вставляешь свой код, а в конце переходишь на новую строку и пишешь "))"
18

» WarCraft 3 / Имя текстурки

В war3x.mpq
"UI\Glues\MainMenu\MainMenu3d_Beta\Arthas_Concept03.blp"
Загруженные файлы
18

» WarCraft 3 / Id приказа

Делаешь отлов ивентов или ищешь тут:
УКРАЛ ИЗ ИНТЕРНЕТА (id приказов)
library ORDER
globals
    //strange ones at bottom
    public constant integer OFFSET=851970
    
    public constant integer absorb=852529
    public constant integer acidbomb=852662
    public constant integer acolyteharvest=852185
    public constant integer AImove=851988
    public constant integer ambush=852131
    public constant integer ancestralspirit=852490
    public constant integer ancestralspirittarget=852491
    public constant integer animatedead=852217
    public constant integer antimagicshell=852186
    public constant integer attack=851983
    public constant integer attackground=851984
    public constant integer attackonce=851985
    public constant integer attributemodskill=852576
    public constant integer auraunholy=852215
    public constant integer auravampiric=852216
    public constant integer autodispel=852132
    public constant integer autodispeloff=852134
    public constant integer autodispelon=852133
    public constant integer autoentangle=852505
    public constant integer autoentangleinstant=852506
    public constant integer autoharvestgold=852021
    public constant integer autoharvestlumber=852022
    public constant integer avatar=852086
    public constant integer avengerform=852531
    public constant integer awaken=852466
    public constant integer banish=852486
    public constant integer barkskin=852135
    public constant integer barkskinoff=852137
    public constant integer barkskinon=852136
    public constant integer battleroar=852099
    public constant integer battlestations=852099
    public constant integer bearform=852138
    public constant integer berserk=852100
    public constant integer blackarrow=852577
    public constant integer blackarrowoff=852579
    public constant integer blackarrowon=852578
    public constant integer blight=852187
    public constant integer blink=852525
    public constant integer blizzard=852089
    public constant integer bloodlust=852101
    public constant integer bloodlustoff=852103
    public constant integer bloodluston=852102
    public constant integer board=852043
    public constant integer breathoffire=852580
    public constant integer breathoffrost=852560
    public constant integer build=851994
    public constant integer burrow=852533
    public constant integer cannibalize=852188
    public constant integer carrionscarabs=852551
    public constant integer carrionscarabsinstant=852554
    public constant integer carrionscarabsoff=852553
    public constant integer carrionscarabson=852552
    public constant integer carrionswarm=852218
    public constant integer chainlightning=852119
    public constant integer channel=852600
    public constant integer charm=852581
    public constant integer chemicalrage=852663
    public constant integer cloudoffog=852473
    public constant integer clusterrockets=852652
    public constant integer coldarrows=852244
    public constant integer coldarrowstarg=852243
    public constant integer controlmagic=852474
    public constant integer corporealform=852493
    public constant integer corrosivebreath=852140
    public constant integer coupleinstant=852508
    public constant integer coupletarget=852507
    public constant integer creepanimatedead=852246
    public constant integer creepdevour=852247
    public constant integer creepheal=852248
    public constant integer creephealoff=852250
    public constant integer creephealon=852249
    public constant integer creepthunderbolt=852252
    public constant integer creepthunderclap=852253
    public constant integer cripple=852189
    public constant integer curse=852190
    public constant integer curseoff=852192
    public constant integer curseon=852191
    public constant integer cyclone=852144
    public constant integer darkconversion=852228
    public constant integer darkportal=852229
    public constant integer darkritual=852219
    public constant integer darksummoning=852220
    public constant integer deathanddecay=852221
    public constant integer deathcoil=852222
    public constant integer deathpact=852223
    public constant integer decouple=852509
    public constant integer defend=852055
    public constant integer detectaoe=852015
    public constant integer detonate=852145
    public constant integer devour=852104
    public constant integer devourmagic=852536
    public constant integer disassociate=852240
    public constant integer disenchant=852495
    public constant integer dismount=852470
    public constant integer dispel=852057
    public constant integer divineshield=852090
    public constant integer doom=852583
    public constant integer drain=852487
    public constant integer dreadlordinferno=852224
    public constant integer dropitem=852001
    public constant integer drunkenhaze=852585
    public constant integer earthquake=852121
    public constant integer eattree=852146
    public constant integer elementalfury=852586
    public constant integer ensnare=852106
    public constant integer ensnareoff=852108
    public constant integer ensnareon=852107
    public constant integer entangle=852147
    public constant integer entangleinstant=852148
    public constant integer entanglingroots=852171
    public constant integer etherealform=852496
    public constant integer evileye=852105
    public constant integer faeriefire=852149
    public constant integer faeriefireoff=852151
    public constant integer faeriefireon=852150
    public constant integer fanofknives=852526
    public constant integer farsight=852122
    public constant integer fingerofdeath=852230
    public constant integer firebolt=852231
    public constant integer flamestrike=852488
    public constant integer flamingarrows=852174
    public constant integer flamingarrowstarg=852173
    public constant integer flamingattack=852540
    public constant integer flamingattacktarg=852539
    public constant integer flare=852060
    public constant integer forceboard=852044
    public constant integer forceofnature=852176
    public constant integer forkedlightning=852586
    public constant integer freezingbreath=852195
    public constant integer frenzy=852561
    public constant integer frenzyoff=852563
    public constant integer frenzyon=852562
    public constant integer frostarmor=852225
    public constant integer frostarmoroff=852459
    public constant integer frostarmoron=852458
    public constant integer frostnova=852226
    public constant integer getitem=851981
    public constant integer gold2lumber=852233
    public constant integer grabtree=852511
    public constant integer harvest=852018
    public constant integer heal=852063
    public constant integer healingspray=852664
    public constant integer healingward=852109
    public constant integer healingwave=852501
    public constant integer healoff=852065
    public constant integer healon=852064
    public constant integer hex=852502
    public constant integer holdposition=851993
    public constant integer holybolt=852092
    public constant integer howlofterror=852588
    public constant integer humanbuild=851995
    public constant integer immolation=852177
    public constant integer impale=852555
    public constant integer incineratearrow=852670
    public constant integer incineratearrowoff=852672
    public constant integer incineratearrowon=852671
    public constant integer inferno=852232
    public constant integer innerfire=852066
    public constant integer innerfireoff=852068
    public constant integer innerfireon=852067
    public constant integer instant=852200
    public constant integer invisibility=852069
    public constant integer lavamonster=852667
    public constant integer lightningshield=852110
    public constant integer load=852046
    public constant integer loadarcher = 852142
    public constant integer loadcorpse=852050
    public constant integer loadcorpseinstant=852053
    public constant integer locustswarm=852556
    public constant integer lumber2gold=852234
    public constant integer magicdefense=852478
    public constant integer magicleash=852480
    public constant integer magicundefense=852479
    public constant integer manaburn=852179
    public constant integer manaflareoff=852513
    public constant integer manaflareon=852512
    public constant integer manashieldoff=852590
    public constant integer manashieldon=852589
    public constant integer massteleport=852093
    public constant integer mechanicalcritter=852564
    public constant integer metamorphosis=852180
    public constant integer militia=852072
    public constant integer militiaconvert=852071
    public constant integer militiaoff=852073
    public constant integer militiaunconvert=852651
    public constant integer mindrot=852565
    public constant integer mirrorimage=852123
    public constant integer monsoon=852591
    public constant integer mount=852469
    public constant integer mounthippogryph=852143
    public constant integer move=851986
    public constant integer nagabuild=852467
    public constant integer neutraldetectaoe=852023
    public constant integer neutralinteract=852566
    public constant integer neutralspell=852630
    public constant integer nightelfbuild=851997
    public constant integer orcbuild=851996
    public constant integer parasite=852601
    public constant integer parasiteoff=852603
    public constant integer parasiteon=852602
    public constant integer patrol=851990
    public constant integer phaseshift=852514
    public constant integer phaseshiftinstant=852517
    public constant integer phaseshiftoff=852516
    public constant integer phaseshifton=852515
    public constant integer phoenixfire=852481
    public constant integer phoenixmorph=852482
    public constant integer poisonarrows=852255
    public constant integer poisonarrowstarg=852254
    public constant integer polymorph=852074
    public constant integer possession=852196
    public constant integer preservation=852568
    public constant integer purge=852111
    public constant integer rainofchaos=852237
    public constant integer rainoffire=852238
    public constant integer raisedead=852197
    public constant integer raisedeadoff=852199
    public constant integer raisedeadon=852198
    public constant integer ravenform=852155
    public constant integer recharge=852157
    public constant integer rechargeoff=852159
    public constant integer rechargeon=852158
    public constant integer rejuvination=852160
    public constant integer renew=852161
    public constant integer renewoff=852163
    public constant integer renewon=852162
    public constant integer repair=852024
    public constant integer repairoff=852026
    public constant integer repairon=852025
    public constant integer replenish=852542
    public constant integer replenishlife=852545
    public constant integer replenishlifeoff=852547
    public constant integer replenishlifeon=852546
    public constant integer replenishmana=852548
    public constant integer replenishmanaoff=852550
    public constant integer replenishmanaon=852549
    public constant integer replenishoff=852544
    public constant integer replenishon=852543
    public constant integer request_hero=852239
    public constant integer requestsacrifice=852201
    public constant integer restoration=852202
    public constant integer restorationoff=852204
    public constant integer restorationon=852203
    public constant integer resumebuild=851999
    public constant integer resumeharvesting=852017
    public constant integer resurrection=852094
    public constant integer returnresources=852020
    public constant integer revenge=852241
    public constant integer revive=852039
    public constant integer roar=852164
    public constant integer robogoblin=852656
    public constant integer root=852165
    public constant integer sacrifice=852205
    public constant integer sanctuary=852569
    public constant integer scout=852181
    public constant integer selfdestruct=852040
    public constant integer selfdestructoff=852042
    public constant integer selfdestructon=852041
    public constant integer sentinel=852182
    public constant integer setrally=851980
    public constant integer shadowsight=852570
    public constant integer shadowstrike=852527
    public constant integer shockwave=852125
    public constant integer silence=852592
    public constant integer sleep=852227
    public constant integer slow=852075
    public constant integer slowoff=852077
    public constant integer slowon=852076
    public constant integer smart=851971
    public constant integer soulburn=852668
    public constant integer soulpreservation=852242
    public constant integer spellshield=852571
    public constant integer spellshieldaoe=852572
    public constant integer spellsteal=852483
    public constant integer spellstealoff=852485
    public constant integer spellstealon=852484
    public constant integer spies=852235
    public constant integer spiritlink=852499
    public constant integer spiritofvengeance=852528
    public constant integer spirittroll=852573
    public constant integer spiritwolf=852126
    public constant integer stampede=852593
    public constant integer standdown=852113
    public constant integer starfall=852183
    public constant integer stasistrap=852114
    public constant integer steal=852574
    public constant integer stomp=852127
    public constant integer stoneform=852206
    public constant integer stop=851972
    public constant integer submerge=852604
    public constant integer summonfactory=852658
    public constant integer summongrizzly=852594
    public constant integer summonphoenix=852489
    public constant integer summonquillbeast=852595
    public constant integer summonwareagle=852596
    public constant integer tankdroppilot=852079
    public constant integer tankloadpilot=852080
    public constant integer tankpilot=852081
    public constant integer taunt=852520
    public constant integer thunderbolt=852095
    public constant integer thunderclap=852096
    public constant integer tornado=852597
    public constant integer townbelloff=852083
    public constant integer townbellon=852082
    public constant integer tranquility=852184
    public constant integer transmute=852665
    public constant integer unavatar=852087
    public constant integer unavengerform=852532
    public constant integer unbearform=852139
    public constant integer unburrow=852534
    public constant integer uncoldarrows=852245
    public constant integer uncorporealform=852494
    public constant integer undeadbuild=851998
    public constant integer undefend=852056
    public constant integer undivineshield=852091
    public constant integer unetherealform=852497
    public constant integer unflamingarrows=852175
    public constant integer unflamingattack=852541
    public constant integer unholyfrenzy=852209
    public constant integer unimmolation=852178
    public constant integer unload=852047
    public constant integer unloadall=852048
    public constant integer unloadallcorpses=852054
    public constant integer unloadallinstant=852049
    public constant integer unpoisonarrows=852256
    public constant integer unravenform=852156
    public constant integer unrobogoblin=852657
    public constant integer unroot=852166
    public constant integer unstableconcoction=852500
    public constant integer unstoneform=852207
    public constant integer unsubmerge=852605
    public constant integer unsummon=852210
    public constant integer unwindwalk=852130
    public constant integer vengeance=852521
    public constant integer vengeanceinstant=852524
    public constant integer vengeanceoff=852523
    public constant integer vengeanceon=852522
    public constant integer volcano=852669
    public constant integer voodoo=852503
    public constant integer ward=852504
    public constant integer waterelemental=852097
    public constant integer wateryminion=852598
    public constant integer web=852211
    public constant integer weboff=852213
    public constant integer webon=852212
    public constant integer whirlwind=852128
    public constant integer windwalk=852129
    public constant integer wispharvest=852214
    
    public constant integer scrollofspeed=852285
    public constant integer cancel=851976
    public constant integer moveslot1=852002
    public constant integer moveslot2=852003
    public constant integer moveslot3=852004
    public constant integer moveslot4=852005
    public constant integer moveslot5=852006
    public constant integer moveslot6=852007
    public constant integer useslot1=852008
    public constant integer useslot2=852009
    public constant integer useslot3=852010
    public constant integer useslot4=852011
    public constant integer useslot5=852012
    public constant integer useslot6=852013
    public constant integer skillmenu=852000
    public constant integer stunned=851973

    public constant integer instant1=851991      //?
    public constant integer instant2=851987      //?
    public constant integer instant3=851975      //?
    public constant integer instant4=852019      //?
endglobals
endlibrary
18

» WarCraft 3 / Особенности потока или что?

quq_CCCP:
Шо за дерьмо! По изощеренне то не мог удаление эффектов сделать? видел код этих вейтов, там наверняка лимит операций уже... Да и вовсе не надо использовать вейты для задержек, уже все изсписано - ненадо вейтов, небудет ничего работать хоть вы обосритесь, есть хештаблица + таймер, забудьте про вейты, за одно и баги связанные с ними...
лень было на ХТ и таймере делать, думал так прокатит. Да и фиг с этим, внес эффекты в массив и в этой же функции удалил их через некоторое время.
18

» WarCraft 3 / Немного про return

Maniac_91:
Насколько мне известно, return просто возвращает результат, не удаляя его.
блин, получается нужно делать что то типо этого?
return g
set g = null
return null
18

» WarCraft 3 / "Убивающая" камера

LordDracula:
всё, пошаманил чуть чуть с моим способом через кеш и заработало
globals
    gamecache udg_cache = InitGameCache("gamecache")
endglobals



function Trig_camera_Conditions takes nothing returns boolean
    if (GetSpellAbilityId() != 'AOws') then
        return false
    endif
    return true
endfunction

function SyncReal takes player p, real val returns real
	if (GetLocalPlayer() == p) then
		call StoreReal(udg_cache, "", "", val)
	endif
	call TriggerSyncStart()
	if (GetLocalPlayer() == p) then
		call SyncStoredReal(udg_cache, "", "")
	endif
	call TriggerSleepAction(2.)
	call TriggerSyncReady()
	return GetStoredReal(udg_cache, "", "")
endfunction

function GetPlayerCameraX takes player p returns real
	if (GetLocalPlayer() == p) then
		return GetCameraTargetPositionX()
	endif
	return 0.
endfunction

function GetPlayerCameraY takes player p returns real
	if (GetLocalPlayer() == p) then
		return GetCameraTargetPositionY()
	endif
	return 0.
endfunction

function Trig_camera_KillUnits takes nothing returns nothing
    call KillUnit( GetEnumUnit() )
endfunction

function Trig_camera_Actions takes nothing returns nothing
    local real x
    local real y
    local rect r
    local group g
    local player p = GetOwningPlayer(GetTriggerUnit())
    set x = GetPlayerCameraX(p)
    set y = GetPlayerCameraY(p)
    set x = SyncReal(GetOwningPlayer(GetTriggerUnit()),x)
    set y = SyncReal(GetOwningPlayer(GetTriggerUnit()),y)
    set r = Rect( x - 500.00*0.5, y - 500.00*0.5, x + 500.00*0.5, y + 500.00*0.5 )
    set g = GetUnitsInRectMatching(r, null)
    call ForGroup(g, function Trig_camera_KillUnits)
    call DestroyGroup(g)
    call RemoveRect(r)
    set g = null
    set r = null
    set x = 0
    set y = 0
endfunction

//===========================================================================
function InitTrig_camera takes nothing returns nothing
    set gg_trg_camera = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_camera, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerAddCondition( gg_trg_camera, Condition( function Trig_camera_Conditions ) )
    call TriggerAddAction( gg_trg_camera, function Trig_camera_Actions )
endfunction
Загруженные файлы
18

» WarCraft 3 / "Убивающая" камера

LordDracula:
тестить уже не с кем)) Идея с обьектом камеры интересная, обязательно потестирую как найду с кем тестить.
18

» WarCraft 3 / "Убивающая" камера

ScopteRectuS:
FabulousTiger:
ScopteRectuS:
FabulousTiger, а для чего нужна функция SyncReal( )?
синхронизировать координаты камеры кастующего игрока
FabulousTiger:
ScopteRectuS:
FabulousTiger, а для чего нужна функция SyncReal( )?
синхронизировать координаты камеры кастующего игрока
А с чем они синхронизируются? Сори за глупый вопрос, никогда не работал с кешем.
ScopteRectuS:
FabulousTiger:
ScopteRectuS:
FabulousTiger, а для чего нужна функция SyncReal( )?
синхронизировать координаты камеры кастующего игрока
FabulousTiger:
ScopteRectuS:
FabulousTiger, а для чего нужна функция SyncReal( )?
синхронизировать координаты камеры кастующего игрока
А с чем они синхронизируются? Сори за глупый вопрос, никогда не работал с кешем.
реальные координат камеры синхронизируются у каждого игрока, я же их доставал через GetLocalPlayer()
Тупо получилось))))) 100 раз успел отредактить, короче убрал работу с точкой, теперь не должно вызывать десинхрон.
блин, всё таки десинхрон есть. Ща буду пытаться чинить
Загруженные файлы
18

» WarCraft 3 / "Убивающая" камера

ScopteRectuS:
	if (GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit())) then
        set p = GetCameraTargetPositionLoc()
    endif
а блин, точка это же наследник хендла. Походу надо переделать под GetCameraTargetPositionX() и GetCameraTargetPositionY()
18

» WarCraft 3 / "Убивающая" камера

ScopteRectuS:
FabulousTiger, а для чего нужна функция SyncReal( )?
синхронизировать координаты камеры кастующего игрока
18

» WarCraft 3 / "Убивающая" камера

globals
    gamecache udg_cache = InitGameCache("gamecache")
endglobals



function Trig_camera_Conditions takes nothing returns boolean
    if (GetSpellAbilityId() != 'AOws') then
        return false
    endif
    return true
endfunction

function SyncReal takes player p, real val returns real
	if (GetLocalPlayer() == p) then
		call StoreReal(udg_cache, "", "", val)
	endif
	call TriggerSyncStart()
	if (GetLocalPlayer() == p) then
		call SyncStoredReal(udg_cache, "", "")
	endif
	call TriggerSleepAction(2.)
	call TriggerSyncReady()
	return GetStoredReal(udg_cache, "", "")
endfunction

function Trig_camera_KillUnits takes nothing returns nothing
    call KillUnit( GetEnumUnit() )
endfunction
function Trig_camera_Actions takes nothing returns nothing
    local real x
    local real y
    local rect r
    local group g
    if (GetLocalPlayer()==GetOwningPlayer(GetTriggerUnit())) then
        set x = GetCameraTargetPositionX()
        set y = GetCameraTargetPositionY()
    endif
    set x = SyncReal(GetOwningPlayer(GetTriggerUnit()),x)
    set y = SyncReal(GetOwningPlayer(GetTriggerUnit()),y)
    set r = Rect( x - 500.00*0.5, y - 500.00*0.5, x + 500.00*0.5, y + 500.00*0.5 )
    set g = GetUnitsInRectMatching(r, null)
    call ForGroup(g, function Trig_camera_KillUnits)
    call DestroyGroup(g)
    call RemoveRect(r)
    set g = null
    set r = null
    set x = 0
    set y = 0
endfunction

//===========================================================================
function InitTrig_camera takes nothing returns nothing
    set gg_trg_camera = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_camera, EVENT_PLAYER_UNIT_SPELL_CHANNEL )
    call TriggerAddCondition( gg_trg_camera, Condition( function Trig_camera_Conditions ) )
    call TriggerAddAction( gg_trg_camera, function Trig_camera_Actions )
endfunction
Там где 'AOws' - это равкод нужной тебе абилки.
Там где 500 это радиус от центра камеры кастующего игрока в котором помрут юниты (он не круглый, а квадратный, но и так сойдет)
бери cameraMap3 (внизу в комментариях)
обязательно на десинхрон потестируй, я не уверен насчет работоспособности этой наработки
Загруженные файлы