1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  4. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  5. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

Dummy Caster v1.4

Submitted by Almia
This bundle is marked as approved. It works and satisfies the submission rules.
  • Dummy Caster


    This is the Dummy Caster system,this allows you to use dummy to cast abilities based on your orders.
    This system is good for stunning,nova,and destroy trees.
    Doesnt support summonings and channeling.
    If you want a vJASS version:
    MUIDummyCasterbyMcKill2009

      • Dummy Caster
        • Events
          • Map initialization
        • Conditions
        • Actions
          • Custom script: set udg_DC_Hash = InitHashtable()
          • -------- ---------------------------- --------
          • -------- Creating Dummy --------
          • -------- ---------------------------- --------
          • Set DC_Loc = (Center of (Playable map area))
          • For each (Integer DC_I) from 1 to 12, do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Player(DC_I)) at DC_Loc facing Default building facing degrees
              • Set DC_DummyCaster[DC_I] = (Last created unit)
          • Custom script: call RemoveLocation(udg_DC_Loc)
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function resets the dummy caster --------
          • -------- ---------------------------- --------
          • Custom script: function DummyCasterReset takes nothing returns nothing
          • -------- ---------------------------- --------
          • -------- you can remove this line if you want --------
          • -------- ---------------------------- --------
          • Custom script: call DisplayTextToForce( GetPlayersAll(), ( "Dummy Caster casted" + GetAbilityName(udg_DC_AddedAbil) ) )
          • -------- ---------------------------- --------
          • Set DC_Loc = (Center of (Playable map area))
          • Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc
          • Custom script: call RemoveLocation(udg_DC_Loc)
          • Custom script: call UnitRemoveAbility(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil)
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function applies the ability to the dummy caster --------
          • -------- ---------------------------- --------
          • Custom script: function ApplyDummyCaster takes nothing returns nothing
          • Custom script: call UnitAddAbility(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil)
          • Custom script: call SetUnitAbilityLevel(udg_DC_DummyCaster[udg_DC_ID],udg_DC_AddedAbil,udg_DC_Level)
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function orders the dummy caster to target unit --------
          • -------- Use call ExecuteFunc("OrderDummyCasterTargetUnit") --------
          • -------- ---------------------------- --------
          • Custom script: function OrderDummyCasterTargetUnit takes nothing returns nothing
          • Custom script: call ApplyDummyCaster()
          • Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc
          • Custom script: call IssueTargetOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_Target)
          • Custom script: call DummyCasterReset()
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function orders the dummy caster to target point --------
          • -------- Use call ExecuteFunc("OrderDummyCasterTargetPoint") --------
          • -------- ---------------------------- --------
          • Custom script: function OrderDummyCasterTargetPoint takes nothing returns nothing
          • Custom script: call ApplyDummyCaster()
          • Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc
          • Custom script: call IssuePointOrderLoc(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_TargetLoc)
          • Custom script: call DummyCasterReset()
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function orders the dummy caster to target destructable --------
          • -------- This is good for destroying trees --------
          • -------- Use call ExecuteFunc("OrderDummyCasterTargetDest") --------
          • -------- ---------------------------- --------
          • Custom script: function OrderDummyCasterTargetDest takes nothing returns nothing
          • Custom script: call ApplyDummyCaster()
          • Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc
          • Custom script: call IssueTargetDestructableOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order,udg_DC_TargetDest)
          • Custom script: call DummyCasterReset()
          • Custom script: endfunction
          • -------- ---------------------------- --------
          • -------- This function orders the dummy caster with no target --------
          • -------- Use call ExecuteFunc("OrderDummyCasterNoTarget") --------
          • -------- ---------------------------- --------
          • Custom script: function OrderDummyCasterNoTarget takes nothing returns nothing
          • Custom script: call ApplyDummyCaster()
          • Unit - Move DC_DummyCaster[DC_ID] instantly to DC_Loc
          • Custom script: call IssueImmediateOrder(udg_DC_DummyCaster[udg_DC_ID],udg_DC_Order)
          • Custom script: call DummyCasterReset()
      • Target Point
        • Events
          • Unit - A unit Starts the effect of an ability
        • Conditions
          • (Ability being cast) Equal to Thunder Clap Ex
        • Actions
          • Set DC_Caster = (Triggering unit)
          • Set DC_TargetLoc = (Position of DC_Caster)
          • -------- ---------------------------- --------
          • -------- Thunder Clap orders dummy to cast Carrion Swarm --------
          • -------- ---------------------------- --------
          • Custom script: set udg_DC_AddedAbil = 'AUcs'
          • Set DC_Order = carrionswarm
          • Set DC_Loc = (Position of DC_Caster)
          • Set DC_Level = (Level of (Ability being cast) for DC_Caster)
          • Custom script: call ExecuteFunc("OrderDummyCasterTargetPoint")
          • Custom script: call RemoveLocation(udg_DC_Loc)
          • Custom script: call RemoveLocation(udg_DC_TargetLoc)
      • Target Unit
        • Events
          • Unit - A unit Starts the effect of an ability
        • Conditions
          • (Ability being cast) Equal to Storm Bolt Ex
        • Actions
          • Set DC_Caster = (Triggering unit)
          • Set DC_Target = (Target unit of ability being cast)
          • -------- ---------------------------- --------
          • -------- Storm Bolt orders dummy to cast Banish --------
          • -------- ---------------------------- --------
          • Custom script: set udg_DC_AddedAbil = 'AHbn'
          • Set DC_Order = banish
          • Set DC_Loc = (Position of DC_Caster)
          • Set DC_Level = (Level of (Ability being cast) for DC_Caster)
          • Custom script: call ExecuteFunc("OrderDummyCasterTargetUnit")
          • Custom script: call RemoveLocation(udg_DC_Loc)
  • v1.0
    -Released
    v1.1
    -Removed Configuration(due to the Timed Lightning Issue)
    v1.2
    -Fixed SetUnitAbilityLevel script
    v1.3
    -Added new function(ApplyDummyCaster)
    v1.4
    -Fixed kill application.(due to defskulls)
Contents

Dummy Caster v1.3 (Map)

Reviews
Moderator
16:00, 25th Oct 2012 Magtheridon96: Approved.
  1. 16:00, 25th Oct 2012
    Magtheridon96: Approved.
     
  2. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    ~Reserved
    The line the creates the game text is just experimental.
     
  3. doomhammer99

    doomhammer99

    Joined:
    Dec 5, 2011
    Messages:
    319
    Resources:
    5
    Models:
    1
    Spells:
    3
    Tutorials:
    1
    Resources:
    5
    4/5 - Spell Idea
    5/5 - Trigger-Less
    3/5 - Description

    Carrion Swarm - Sucks, always casted on the right
     
  4. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Of course,im just using position of caster,just use offset and your problem is done
     
  5. Magtheridon96

    Magtheridon96

    Joined:
    Dec 12, 2008
    Messages:
    6,005
    Resources:
    26
    Maps:
    1
    Spells:
    8
    Tutorials:
    7
    JASS:
    10
    Resources:
    26
    You can call ApplyDummyCaster directly inside your Order functions.
    It would make things easier for the user.

    Also, the user should be able to set the level as he pleases.
    It shouldn't be set to the level of the caster.
    What if the dummy abilities are not made to have a linear relationship with the caster's level? :D
     
  6. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Done.
     
  7. doomhammer99

    doomhammer99

    Joined:
    Dec 5, 2011
    Messages:
    319
    Resources:
    5
    Models:
    1
    Spells:
    3
    Tutorials:
    1
    Resources:
    5
    You're getting good, I think you're the next spell moderator.
    (I think)
     
  8. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    LoL,i have been here for almost 8 months and i have only 11 months of experience in triggering and coding :D
     
  9. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    - You should coz not all abilities are instant cast like flamestrike, it has a delay...
    - Since you are using custom script, it is better to use coordinates to reset and create the dummy...
     
  10. Marsal

    Marsal

    Joined:
    Jun 24, 2009
    Messages:
    1,347
    Resources:
    15
    Maps:
    1
    Spells:
    14
    Resources:
    15
    /off how the hell did you do that multi page description?
     
  11. sonofjay

    sonofjay

    Joined:
    Oct 28, 2011
    Messages:
    4,247
    Resources:
    20
    Packs:
    1
    Maps:
    13
    Template:
    5
    Tutorials:
    1
    Resources:
    20
    he use the new tab codes.
     
  12. Marsal

    Marsal

    Joined:
    Jun 24, 2009
    Messages:
    1,347
    Resources:
    15
    Maps:
    1
    Spells:
    14
    Resources:
    15
    Ohh I found it :) Thanks for the info.
     
  13. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Mckill2009,flame strike is a channeling ability
    im using location instead of coordinates because it might cause bugs.
    ex.when i used coordinates,the units selection circle is moved,but not the model
     
  14. mckill2009

    mckill2009

    Joined:
    Mar 10, 2009
    Messages:
    4,696
    Resources:
    34
    Maps:
    5
    Spells:
    27
    JASS:
    2
    Resources:
    34
    that's what I said >>> coz not all abilities are instant cast like flamestrike, it has a delay
    use SetUnitPosition instead os SetUnitX/Y
     
  15. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Its okay.
    Also,i mentioned it before im not supporting these kind of abilities because im only using 1 Dummy
     
  16. Kingz

    Kingz

    Joined:
    Jun 5, 2008
    Messages:
    2,470
    Resources:
    6
    Spells:
    5
    Tutorials:
    1
    Resources:
    6
    Well i guess this might be useful, even tho it exists already in vjass.
     
  17. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Yeah right,but i feel sad because GUI users dont have it :/
    Thats why i created it.
     
  18. defskull

    defskull

    Joined:
    Mar 27, 2008
    Messages:
    7,978
    Resources:
    17
    Spells:
    17
    Resources:
    17
    How can you approve this bugged system ?
    Try let the Dummy casts Slow (Sorceress) to multiple picked units (or even single unit).

    You'll notice, it can't.

    Why ?
    Because it only corresponds to only (Triggering player)'s unit which in this case, it will only cast the spell if the dummy's owning player is the player casting the spell.

    Solution:
    Create each player their own dummy unit and make it array for each instance.
    Dummy[1] for Player 1
    -----
    Dummy[12] for Player 12

    Just noticed this just now while I was experimenting some things.
    And please, before you start any argument, I think you should try it first (I was weird too).

    Also, it is better this way, create each player their own dummy unit, why ?
    Because certain game (such as DotA) will count as Player Kill like dummy casting Storm Bolt that deals damage. So, what if the dummy kills the unit ?
    The trigger interprets as Neutral Passive kills the unit, does that mean NP will get the gold ? No.
    This is why it is nice to have each dummy for each player.
     
  19. Almia

    Almia

    Joined:
    Apr 24, 2012
    Messages:
    4,839
    Resources:
    35
    Spells:
    30
    Tutorials:
    4
    JASS:
    1
    Resources:
    35
    Ok ok