MUI DummyCaster[GUI] v1.1

  • Like
Reactions: Imadori
MUI DummyCaster v1.1

Intro

Installation

Main Trigger

Sample Trigger

Notes

Bugs


- This system is related to my http://www.hiveworkshop.com/forums/submissions-414/snippet-muidummycasters-211663/ in jass resource, I've made a GUI version so that GUIers can have it's benefit

- Creates only 1 dummy for instant spells like firebolt, carrion swarm, banish, etc

- Supports channel spells by creating another dummy to channel the spell like flamestrike, starfall, blizzard, etc

- You may control the point where the dummy is created and cast to a target or location where you can see the projectile is traveling

- JNGP is not required

- Very easy to implement, MDC_Cast, MDC_CastPoint, MDC_CastTarget

- Check the Automatically create unknown variables when pasting trigger data, via File/preferences/general tab
- Copy the dummy caster unit to your map
- Copy the MUI_DummyCaster folder which has the MDC Setup, MDC OnCast, MDC OffCast trigger in it
- Change the MDC_DummyID from MDC Setup to the imported dummy
- DONE!

  • MDC Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • -------- Import the dummy from the object editor --------
      • Set MDC_DummyID = DummyCaster
      • -------- WARNING: Do not touch anything below this line! --------
      • -------- Initializing Hashtable --------
      • Custom script: set udg_MDC_Hashtable = InitHashtable()
      • -------- Default level is 1 --------
      • Set MDC_Level = 1
      • -------- Default 3 values you may use, pick one as desired --------
      • Set MDC_Cast = 1
      • Set MDC_CastPoint = 2
      • Set MDC_CastTarget = 3
  • MDC OnCast
    • Events
    • Conditions
    • Actions
      • Custom script: call ExecuteFunc("MDC_Evaluate")
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • -------- Removing the location and resetting everything --------
      • Custom script: function MDC_Reset takes nothing returns nothing
      • Custom script: call RemoveLocation(udg_MDC_Location)
      • Custom script: set udg_MDC_Location = null
      • Set MDC_Level = 1
      • Set MDC_Height = 0.00
      • Set MDC_OrderID = 0
      • Set MDC_PointToPointCast = False
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function MDC_RefreshDummy takes unit u returns nothing
      • Custom script: call UnitRemoveAbility(u, LoadInteger(udg_MDC_Hashtable, GetHandleId(u), 0))
      • Custom script: call GroupAddUnit(udg_MDC_Group, u)
      • Custom script: call SetUnitOwner(u, Player(15), false)
      • Custom script: call PauseUnit(u, true)
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function MDC_GetDummyUnit takes nothing returns unit
      • Custom script: if FirstOfGroup(udg_MDC_Group)==null then
      • Custom script: set udg_MDC_DummyCaster = CreateUnit(Player(15), udg_MDC_DummyID, 0, 0, 0)
      • Custom script: call UnitRemoveAbility(udg_MDC_DummyCaster, 'Amov')
      • Custom script: else
      • Custom script: set udg_MDC_DummyCaster = FirstOfGroup(udg_MDC_Group)
      • Unit Group - Remove MDC_DummyCaster from MDC_Group
      • Custom script: endif
      • Custom script: return udg_MDC_DummyCaster
      • Custom script: endfunction
      • -------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------
      • Custom script: function MDC_Evaluate takes nothing returns nothing
      • Custom script: set udg_MDC_DummyCaster = MDC_GetDummyUnit()
      • Unit - Unpause MDC_DummyCaster
      • Unit - Add MDC_AbilityID to MDC_DummyCaster
      • Unit - Set level of MDC_AbilityID for MDC_DummyCaster to MDC_Level
      • Animation - Change MDC_DummyCaster flying height to MDC_Height at 0.00
      • Custom script: call SaveInteger(udg_MDC_Hashtable, GetHandleId(udg_MDC_DummyCaster), 0, udg_MDC_AbilityID)
      • Custom script: if udg_MDC_Location==null then
      • Custom script: call MDC_RefreshDummy(udg_MDC_DummyCaster)
      • Custom script: call MDC_Reset()
      • Custom script: call DisplayTextToPlayer(udg_MDC_Player, 0, 0, "[MDC_Location] ERROR: Location is null")
      • Custom script: return
      • Custom script: else
      • Custom script: call SetUnitPositionLoc(udg_MDC_DummyCaster, udg_MDC_Location)
      • Custom script: endif
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MDC_CastType Equal to MDC_Cast
        • Then - Actions
          • Custom script: call IssueImmediateOrderById(udg_MDC_DummyCaster, udg_MDC_OrderID)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • MDC_CastType Equal to MDC_CastPoint
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MDC_PointToPointCast Equal to True
                • Then - Actions
                  • Custom script: call IssuePointOrderByIdLoc(udg_MDC_DummyCaster, udg_MDC_OrderID, udg_MDC_ProjectileAnglePoint)
                  • Custom script: call RemoveLocation(udg_MDC_ProjectileAnglePoint)
                • Else - Actions
                  • Custom script: call IssuePointOrderByIdLoc(udg_MDC_DummyCaster, udg_MDC_OrderID, udg_MDC_Location)
            • Else - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • MDC_CastType Equal to MDC_CastTarget
                • Then - Actions
                  • -------- Target Unit has a fail-safe in case there is a null unit --------
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • MDC_Target Equal to No unit
                    • Then - Actions
                      • Custom script: call MDC_RefreshDummy(udg_MDC_DummyCaster)
                      • Custom script: call MDC_Reset()
                      • Custom script: call DisplayTextToPlayer(udg_MDC_Player, 0, 0, "[MDC_Target] ERROR: Attempt to cast to a null unit")
                    • Else - Actions
                      • Custom script: call IssueTargetOrderById(udg_MDC_DummyCaster, udg_MDC_OrderID, udg_MDC_Target)
                • Else - Actions
      • Custom script: call MDC_Reset()
  • MDC OffCast
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to MDC_DummyID
    • Actions
      • Custom script: local unit u = GetTriggerUnit()
      • Custom script: call UnitRemoveAbility(u, LoadInteger(udg_MDC_Hashtable, GetHandleId(u), 0))
      • Custom script: call GroupAddUnit(udg_MDC_Group, u)
      • Custom script: call SetUnitOwner(u, Player(15), false)
      • Custom script: set u = null

NOTE:
The TestLocation and TestAngle is NOT related to the system, so you may delete it from the variable editor

  • CastSelf
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set TestLocation = (Center of (Playable map area))
      • Set MDC_AbilityID = Thunder Clap
      • Set MDC_OrderID = 852096
      • Set MDC_Location = (TestLocation offset by 600.00 towards TestAngle degrees)
      • Set MDC_CastType = MDC_Cast
      • Set MDC_Level = 1
      • Trigger - Run MDC OnCast <gen> (ignoring conditions)
      • Set TestAngle = (TestAngle + 60.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • TestAngle Greater than 360.00
        • Then - Actions
          • Set TestAngle = 0.00
        • Else - Actions
      • Custom script: call RemoveLocation(udg_TestLocation)
  • CastPointChannel
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TestLocation = (Center of (Playable map area))
      • Set TestAngle = 0.00
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- it doesnt matter which order you will place the MDC's as long as the MDC_OnCast is last --------
          • Set MDC_AbilityID = Flame Strike (Neutral Hostile)
          • Set MDC_OrderID = 852488
          • Set MDC_Player = Player 1 (Red)
          • Set MDC_CastType = MDC_CastPoint
          • Set MDC_Location = (TestLocation offset by 400.00 towards TestAngle degrees)
          • Trigger - Run MDC OnCast <gen> (ignoring conditions)
          • Set TestAngle = (TestAngle + 60.00)
      • Custom script: call RemoveLocation(udg_TestLocation)
  • CastTarget
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TestLocation = (Center of (Playable map area))
      • Set TestAngle = 0.00
      • Unit Group - Pick every unit in (Units within 1500.00 of TestLocation matching ((Owner of (Matching unit)) Equal to Neutral Hostile)) and do (Actions)
        • Loop - Actions
          • Set MDC_AbilityID = Firebolt (Neutral Hostile)
          • Set MDC_OrderID = 852231
          • Set MDC_Target = (Picked unit)
          • Set MDC_Player = Player 1 (Red)
          • Set MDC_CastType = MDC_CastTarget
          • Set MDC_Location = (Center of (Playable map area))
          • -------- if you want to change the height --------
          • Set MDC_Height = 200.00
          • Trigger - Run MDC OnCast <gen> (ignoring conditions)
      • Custom script: call RemoveLocation(udg_TestLocation)
  • CastPointToPoint
    • Events
      • Time - Every 2.00 seconds of game time
    • Conditions
    • Actions
      • Set TestLocation = (Center of (Playable map area))
      • Set TestAngle = 0.00
      • For each (Integer A) from 1 to 6, do (Actions)
        • Loop - Actions
          • -------- it doesnt matter which order you will place the MDC's as long as the MDC_OnCast is last --------
          • Set MDC_AbilityID = Carrion Swarm (Neutral Hostile)
          • Set MDC_OrderID = 852218
          • Set MDC_Player = Player 1 (Red)
          • Set MDC_CastType = MDC_CastPoint
          • Set MDC_Location = (Center of (Playable map area))
          • -------- In case you want to see a point cast and control the projectile direction --------
          • Set MDC_PointToPointCast = True
          • -------- You need to set the offset from here --------
          • Set MDC_ProjectileAnglePoint = (MDC_Location offset by 100.00 towards TestAngle degrees)
          • Trigger - Run MDC OnCast <gen> (ignoring conditions)
          • Set TestAngle = (TestAngle + 60.00)
      • Custom script: call RemoveLocation(udg_TestLocation)

- The dummy spell must have 0 mana
- The cast range of the spell must be greater than the cast point (Location)
- The target unit must be targetable, else this will bug

- For unknown reasons the MDC_Cast or no target cast cannot run under a loop like the rest,
if you spot the solution you will be credited


Variable Definition

MDC_AbilityID = this is the ability type, see the sample trigger
MDC_PointToPointCast = boolean, if you want to see a projectile traveling in you desired angle, set it to true, see the CastPointToPoint trigger
MDC_CastType = how you want your spell to be casted?, uses MDC_Cast, MDC_CastPoint, MDC_CastTarget
MDC_Level = level of the spell
MDC_OrderID = the order of the spell
MDC_Player = the owning player of the spell
MDC_Location = the point where the dummy is created or placed
MDC_ProjectileAnglePoint = this is the offset where you want to see the projectile is traveling, used only by MDC_CastPoint, see the CastPointToPoint trigger
MDC_Height = sets the height of the dummy unit in case you want to see a projectile traveling from above
MDC_Target = oviously the spell target, must be reachable or in range with the dummy spell, else this will bug

-



v1.1
- Minor changes for the OnCast for faster execution
- Error messages changed



Keywords:
mckill2009, caster, dummy, spell, hashtable, dynamic, dota
Contents

MUI_DummyCaster (Map)

Reviews
MUI DummyCaster[GUI] v1.1 | Reviewed by Maker | 2nd Jun 2013 APPROVED A useful system [tr] Remove upgrades used from the dummy and reduce the sight range Using order ids might not be GUI friendly. You could add a...

Moderator

M

Moderator


MUI DummyCaster[GUI] v1.1 | Reviewed by Maker | 2nd Jun 2013
APPROVED


126248-albums6177-picture66521.png


  • A useful system
126248-albums6177-picture66523.png


  • Remove upgrades used from the dummy and reduce the sight range
  • Using order ids might not be GUI friendly. You could add a demo trigger
    that prints out the order id of abilities
[tr]
 
-------- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --------

Why do you always do this? it makes the code not readable :((
like what?, coz this semi-jass format is shit anyway, I preffer to make it in pure jass but GUIers cant read...

I suggest make debugging configurable,like ISDebugMode = true.
nahhh, better if they know the error...

I'll try to find the bug solution :D
yeah maybe you can, I tried many times, but failed, a small timer interval of 0.03 works...

I may change the MDC_Reset() locations coz it's kinda messed a little atm...
 
Btw,I would like to suggest that you don't use OrderIds. This is GUI in fact,so make it a string.
Tried to apply string at first but ended up using integers...

here's the list of orderID's from http://www.hiveworkshop.com/forums/jass-resources-412/repo-order-ids-197002/

JASS:
globals
    //strange ones at bottom
    constant integer ORDER_OFFSET=851970
    
    constant integer ORDER_wandillusion=852274

    constant integer ORDER_absorb=852529
    constant integer ORDER_acidbomb=852662
    constant integer ORDER_acolyteharvest=852185
    constant integer ORDER_AImove=851988
    constant integer ORDER_ambush=852131
    constant integer ORDER_ancestralspirit=852490
    constant integer ORDER_ancestralspirittarget=852491
    constant integer ORDER_animatedead=852217
    constant integer ORDER_antimagicshell=852186
    constant integer ORDER_attack=851983
    constant integer ORDER_attackground=851984
    constant integer ORDER_attackonce=851985
    constant integer ORDER_attributemodskill=852576
    constant integer ORDER_auraunholy=852215
    constant integer ORDER_auravampiric=852216
    constant integer ORDER_autodispel=852132
    constant integer ORDER_autodispeloff=852134
    constant integer ORDER_autodispelon=852133
    constant integer ORDER_autoentangle=852505
    constant integer ORDER_autoentangleinstant=852506
    constant integer ORDER_autoharvestgold=852021
    constant integer ORDER_autoharvestlumber=852022
    constant integer ORDER_avatar=852086
    constant integer ORDER_avengerform=852531
    constant integer ORDER_awaken=852466
    constant integer ORDER_banish=852486
    constant integer ORDER_barkskin=852135
    constant integer ORDER_barkskinoff=852137
    constant integer ORDER_barkskinon=852136
    constant integer ORDER_battleroar=852099
    constant integer ORDER_battlestations=852099
    constant integer ORDER_bearform=852138
    constant integer ORDER_berserk=852100
    constant integer ORDER_blackarrow=852577
    constant integer ORDER_blackarrowoff=852579
    constant integer ORDER_blackarrowon=852578
    constant integer ORDER_blight=852187
    constant integer ORDER_blink=852525
    constant integer ORDER_blizzard=852089
    constant integer ORDER_bloodlust=852101
    constant integer ORDER_bloodlustoff=852103
    constant integer ORDER_bloodluston=852102
    constant integer ORDER_board=852043
    constant integer ORDER_breathoffire=852580
    constant integer ORDER_breathoffrost=852560
    constant integer ORDER_build=851994
    constant integer ORDER_burrow=852533
    constant integer ORDER_cannibalize=852188
    constant integer ORDER_carrionscarabs=852551
    constant integer ORDER_carrionscarabsinstant=852554
    constant integer ORDER_carrionscarabsoff=852553
    constant integer ORDER_carrionscarabson=852552
    constant integer ORDER_carrionswarm=852218
    constant integer ORDER_chainlightning=852119
    constant integer ORDER_channel=852600
    constant integer ORDER_charm=852581
    constant integer ORDER_chemicalrage=852663
    constant integer ORDER_cloudoffog=852473
    constant integer ORDER_clusterrockets=852652
    constant integer ORDER_coldarrows=852244
    constant integer ORDER_coldarrowstarg=852243
    constant integer ORDER_controlmagic=852474
    constant integer ORDER_corporealform=852493
    constant integer ORDER_corrosivebreath=852140
    constant integer ORDER_coupleinstant=852508
    constant integer ORDER_coupletarget=852507
    constant integer ORDER_creepanimatedead=852246
    constant integer ORDER_creepdevour=852247
    constant integer ORDER_creepheal=852248
    constant integer ORDER_creephealoff=852250
    constant integer ORDER_creephealon=852249
    constant integer ORDER_creepthunderbolt=852252
    constant integer ORDER_creepthunderclap=852253
    constant integer ORDER_cripple=852189
    constant integer ORDER_curse=852190
    constant integer ORDER_curseoff=852192
    constant integer ORDER_curseon=852191
    constant integer ORDER_cyclone=852144
    constant integer ORDER_darkconversion=852228
    constant integer ORDER_darkportal=852229
    constant integer ORDER_darkritual=852219
    constant integer ORDER_darksummoning=852220
    constant integer ORDER_deathanddecay=852221
    constant integer ORDER_deathcoil=852222
    constant integer ORDER_deathpact=852223
    constant integer ORDER_decouple=852509
    constant integer ORDER_defend=852055
    constant integer ORDER_detectaoe=852015
    constant integer ORDER_detonate=852145
    constant integer ORDER_devour=852104
    constant integer ORDER_devourmagic=852536
    constant integer ORDER_disassociate=852240
    constant integer ORDER_disenchant=852495
    constant integer ORDER_dismount=852470
    constant integer ORDER_dispel=852057
    constant integer ORDER_divineshield=852090
    constant integer ORDER_doom=852583
    constant integer ORDER_drain=852487
    constant integer ORDER_dreadlordinferno=852224
    constant integer ORDER_dropitem=852001
    constant integer ORDER_drunkenhaze=852585
    constant integer ORDER_earthquake=852121
    constant integer ORDER_eattree=852146
    constant integer ORDER_elementalfury=852586
    constant integer ORDER_ensnare=852106
    constant integer ORDER_ensnareoff=852108
    constant integer ORDER_ensnareon=852107
    constant integer ORDER_entangle=852147
    constant integer ORDER_entangleinstant=852148
    constant integer ORDER_entanglingroots=852171
    constant integer ORDER_etherealform=852496
    constant integer ORDER_evileye=852105
    constant integer ORDER_faeriefire=852149
    constant integer ORDER_faeriefireoff=852151
    constant integer ORDER_faeriefireon=852150
    constant integer ORDER_fanofknives=852526
    constant integer ORDER_farsight=852122
    constant integer ORDER_fingerofdeath=852230
    constant integer ORDER_firebolt=852231
    constant integer ORDER_flamestrike=852488
    constant integer ORDER_flamingarrows=852174
    constant integer ORDER_flamingarrowstarg=852173
    constant integer ORDER_flamingattack=852540
    constant integer ORDER_flamingattacktarg=852539
    constant integer ORDER_flare=852060
    constant integer ORDER_forceboard=852044
    constant integer ORDER_forceofnature=852176
    constant integer ORDER_forkedlightning=852586
    constant integer ORDER_freezingbreath=852195
    constant integer ORDER_frenzy=852561
    constant integer ORDER_frenzyoff=852563
    constant integer ORDER_frenzyon=852562
    constant integer ORDER_frostarmor=852225
    constant integer ORDER_frostarmoroff=852459
    constant integer ORDER_frostarmoron=852458
    constant integer ORDER_frostnova=852226
    constant integer ORDER_getitem=851981
    constant integer ORDER_gold2lumber=852233
    constant integer ORDER_grabtree=852511
    constant integer ORDER_harvest=852018
    constant integer ORDER_heal=852063
    constant integer ORDER_healingspray=852664
    constant integer ORDER_healingward=852109
    constant integer ORDER_healingwave=852501
    constant integer ORDER_healoff=852065
    constant integer ORDER_healon=852064
    constant integer ORDER_hex=852502
    constant integer ORDER_holdposition=851993
    constant integer ORDER_holybolt=852092
    constant integer ORDER_howlofterror=852588
    constant integer ORDER_humanbuild=851995
    constant integer ORDER_immolation=852177
    constant integer ORDER_impale=852555
    constant integer ORDER_incineratearrow=852670
    constant integer ORDER_incineratearrowoff=852672
    constant integer ORDER_incineratearrowon=852671
    constant integer ORDER_inferno=852232
    constant integer ORDER_innerfire=852066
    constant integer ORDER_innerfireoff=852068
    constant integer ORDER_innerfireon=852067
    constant integer ORDER_instant=852200
    constant integer ORDER_invisibility=852069
    constant integer ORDER_lavamonster=852667
    constant integer ORDER_lightningshield=852110
    constant integer ORDER_load=852046
    constant integer ORDER_loadarcher = 852142
    constant integer ORDER_loadcorpse=852050
    constant integer ORDER_loadcorpseinstant=852053
    constant integer ORDER_locustswarm=852556
    constant integer ORDER_lumber2gold=852234
    constant integer ORDER_magicdefense=852478
    constant integer ORDER_magicleash=852480
    constant integer ORDER_magicundefense=852479
    constant integer ORDER_manaburn=852179
    constant integer ORDER_manaflareoff=852513
    constant integer ORDER_manaflareon=852512
    constant integer ORDER_manashieldoff=852590
    constant integer ORDER_manashieldon=852589
    constant integer ORDER_massteleport=852093
    constant integer ORDER_mechanicalcritter=852564
    constant integer ORDER_metamorphosis=852180
    constant integer ORDER_militia=852072
    constant integer ORDER_militiaconvert=852071
    constant integer ORDER_militiaoff=852073
    constant integer ORDER_militiaunconvert=852651
    constant integer ORDER_mindrot=852565
    constant integer ORDER_mirrorimage=852123
    constant integer ORDER_monsoon=852591
    constant integer ORDER_mount=852469
    constant integer ORDER_mounthippogryph=852143
    constant integer ORDER_move=851986
    constant integer ORDER_nagabuild=852467
    constant integer ORDER_neutraldetectaoe=852023
    constant integer ORDER_neutralinteract=852566
    constant integer ORDER_neutralspell=852630
    constant integer ORDER_nightelfbuild=851997
    constant integer ORDER_orcbuild=851996
    constant integer ORDER_parasite=852601
    constant integer ORDER_parasiteoff=852603
    constant integer ORDER_parasiteon=852602
    constant integer ORDER_patrol=851990
    constant integer ORDER_phaseshift=852514
    constant integer ORDER_phaseshiftinstant=852517
    constant integer ORDER_phaseshiftoff=852516
    constant integer ORDER_phaseshifton=852515
    constant integer ORDER_phoenixfire=852481
    constant integer ORDER_phoenixmorph=852482
    constant integer ORDER_poisonarrows=852255
    constant integer ORDER_poisonarrowstarg=852254
    constant integer ORDER_polymorph=852074
    constant integer ORDER_possession=852196
    constant integer ORDER_preservation=852568
    constant integer ORDER_purge=852111
    constant integer ORDER_rainofchaos=852237
    constant integer ORDER_rainoffire=852238
    constant integer ORDER_raisedead=852197
    constant integer ORDER_raisedeadoff=852199
    constant integer ORDER_raisedeadon=852198
    constant integer ORDER_ravenform=852155
    constant integer ORDER_recharge=852157
    constant integer ORDER_rechargeoff=852159
    constant integer ORDER_rechargeon=852158
    constant integer ORDER_rejuvination=852160
    constant integer ORDER_renew=852161
    constant integer ORDER_renewoff=852163
    constant integer ORDER_renewon=852162
    constant integer ORDER_repair=852024
    constant integer ORDER_repairoff=852026
    constant integer ORDER_repairon=852025
    constant integer ORDER_replenish=852542
    constant integer ORDER_replenishlife=852545
    constant integer ORDER_replenishlifeoff=852547
    constant integer ORDER_replenishlifeon=852546
    constant integer ORDER_replenishmana=852548
    constant integer ORDER_replenishmanaoff=852550
    constant integer ORDER_replenishmanaon=852549
    constant integer ORDER_replenishoff=852544
    constant integer ORDER_replenishon=852543
    constant integer ORDER_request_hero=852239
    constant integer ORDER_requestsacrifice=852201
    constant integer ORDER_restoration=852202
    constant integer ORDER_restorationoff=852204
    constant integer ORDER_restorationon=852203
    constant integer ORDER_resumebuild=851999
    constant integer ORDER_resumeharvesting=852017
    constant integer ORDER_resurrection=852094
    constant integer ORDER_returnresources=852020
    constant integer ORDER_revenge=852241
    constant integer ORDER_revive=852039
    constant integer ORDER_roar=852164
    constant integer ORDER_robogoblin=852656
    constant integer ORDER_root=852165
    constant integer ORDER_sacrifice=852205
    constant integer ORDER_sanctuary=852569
    constant integer ORDER_scout=852181
    constant integer ORDER_selfdestruct=852040
    constant integer ORDER_selfdestructoff=852042
    constant integer ORDER_selfdestructon=852041
    constant integer ORDER_sentinel=852182
    constant integer ORDER_setrally=851980
    constant integer ORDER_shadowsight=852570
    constant integer ORDER_shadowstrike=852527
    constant integer ORDER_shockwave=852125
    constant integer ORDER_silence=852592
    constant integer ORDER_sleep=852227
    constant integer ORDER_slow=852075
    constant integer ORDER_slowoff=852077
    constant integer ORDER_slowon=852076
    constant integer ORDER_smart=851971
    constant integer ORDER_soulburn=852668
    constant integer ORDER_soulpreservation=852242
    constant integer ORDER_spellshield=852571
    constant integer ORDER_spellshieldaoe=852572
    constant integer ORDER_spellsteal=852483
    constant integer ORDER_spellstealoff=852485
    constant integer ORDER_spellstealon=852484
    constant integer ORDER_spies=852235
    constant integer ORDER_spiritlink=852499
    constant integer ORDER_spiritofvengeance=852528
    constant integer ORDER_spirittroll=852573
    constant integer ORDER_spiritwolf=852126
    constant integer ORDER_stampede=852593
    constant integer ORDER_standdown=852113
    constant integer ORDER_starfall=852183
    constant integer ORDER_stasistrap=852114
    constant integer ORDER_steal=852574
    constant integer ORDER_stomp=852127
    constant integer ORDER_stoneform=852206
    constant integer ORDER_stop=851972
    constant integer ORDER_submerge=852604
    constant integer ORDER_summonfactory=852658
    constant integer ORDER_summongrizzly=852594
    constant integer ORDER_summonphoenix=852489
    constant integer ORDER_summonquillbeast=852595
    constant integer ORDER_summonwareagle=852596
    constant integer ORDER_tankdroppilot=852079
    constant integer ORDER_tankloadpilot=852080
    constant integer ORDER_tankpilot=852081
    constant integer ORDER_taunt=852520
    constant integer ORDER_thunderbolt=852095
    constant integer ORDER_thunderclap=852096
    constant integer ORDER_tornado=852597
    constant integer ORDER_townbelloff=852083
    constant integer ORDER_townbellon=852082
    constant integer ORDER_tranquility=852184
    constant integer ORDER_transmute=852665
    constant integer ORDER_unavatar=852087
    constant integer ORDER_unavengerform=852532
    constant integer ORDER_unbearform=852139
    constant integer ORDER_unburrow=852534
    constant integer ORDER_uncoldarrows=852245
    constant integer ORDER_uncorporealform=852494
    constant integer ORDER_undeadbuild=851998
    constant integer ORDER_undefend=852056
    constant integer ORDER_undivineshield=852091
    constant integer ORDER_unetherealform=852497
    constant integer ORDER_unflamingarrows=852175
    constant integer ORDER_unflamingattack=852541
    constant integer ORDER_unholyfrenzy=852209
    constant integer ORDER_unimmolation=852178
    constant integer ORDER_unload=852047
    constant integer ORDER_unloadall=852048
    constant integer ORDER_unloadallcorpses=852054
    constant integer ORDER_unloadallinstant=852049
    constant integer ORDER_unpoisonarrows=852256
    constant integer ORDER_unravenform=852156
    constant integer ORDER_unrobogoblin=852657
    constant integer ORDER_unroot=852166
    constant integer ORDER_unstableconcoction=852500
    constant integer ORDER_unstoneform=852207
    constant integer ORDER_unsubmerge=852605
    constant integer ORDER_unsummon=852210
    constant integer ORDER_unwindwalk=852130
    constant integer ORDER_vengeance=852521
    constant integer ORDER_vengeanceinstant=852524
    constant integer ORDER_vengeanceoff=852523
    constant integer ORDER_vengeanceon=852522
    constant integer ORDER_volcano=852669
    constant integer ORDER_voodoo=852503
    constant integer ORDER_ward=852504
    constant integer ORDER_waterelemental=852097
    constant integer ORDER_wateryminion=852598
    constant integer ORDER_web=852211
    constant integer ORDER_weboff=852213
    constant integer ORDER_webon=852212
    constant integer ORDER_whirlwind=852128
    constant integer ORDER_windwalk=852129
    constant integer ORDER_wispharvest=852214
    
    constant integer ORDER_scrollofspeed=852285
    constant integer ORDER_cancel=851976
    constant integer ORDER_moveslot1=852002
    constant integer ORDER_moveslot2=852003
    constant integer ORDER_moveslot3=852004
    constant integer ORDER_moveslot4=852005
    constant integer ORDER_moveslot5=852006
    constant integer ORDER_moveslot6=852007
    constant integer ORDER_useslot1=852008
    constant integer ORDER_useslot2=852009
    constant integer ORDER_useslot3=852010
    constant integer ORDER_useslot4=852011
    constant integer ORDER_useslot5=852012
    constant integer ORDER_useslot6=852013
    constant integer ORDER_skillmenu=852000
    constant integer ORDER_stunned=851973

    constant integer ORDER_instant1=851991      //?
    constant integer ORDER_instant2=851987      //?
    constant integer ORDER_instant3=851975      //?
    constant integer ORDER_instant4=852019      //?
endglobals
 
Level 10
Joined
Aug 21, 2010
Messages
316
I would include this in the main trigger(this is just my opinion)

  • MDC Setup
  • Events
  • Map initialization
  • Conditions
  • Actions
  • -------- Import the dummy from the object editor --------
  • Set MDC_DummyID = DummyCaster
  • -------- WARNING: Do not touch anything below this line! --------
  • -------- Initializing Hashtable --------
  • Custom script: set udg_MDC_Hashtable = InitHashtable()
  • -------- Default level is 1 --------
  • Set MDC_Level = 1
  • -------- Default 3 values you may use, pick one as desired --------
  • Set MDC_Cast = 1
  • Set MDC_CastPoint = 2
  • Set MDC_CastTarget = 3
  • MDC OffCast
  • Events
  • Unit - A unit Finishes casting an ability
  • Conditions
  • (Unit-type of (Triggering unit)) Equal to MDC_DummyID
  • Actions
  • Custom script: local unit u = GetTriggerUnit()
  • Custom script: call UnitRemoveAbility(u, LoadInteger(udg_MDC_Hashtable, GetHandleId(u), 0))
  • Custom script: call GroupAddUnit(udg_MDC_Group, u)
  • Custom script: call SetUnitOwner(u, Player(15), false)
  • Custom script: set u = null
 
Level 1
Joined
Aug 25, 2011
Messages
1
I try to implement the system but when a unit dies it create lots of dummy units, they don't disapear, is it normal ? The game will probably lag.
To illustrated my issues, I change the test map (add dying units + display dummy unit + 1 spell enabled)

Anyone know how to recycle these dummy units ?
 

Attachments

  • MUI_DummyCaster v1.1_test.w3x
    29 KB · Views: 36
Top