• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Samuro Slam V1.1 [MUI]

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
  • Like
Reactions: IcemanBo
Samuro Slam V1.1 [MUI]
Created by Destination9747

Spell Description: The Blademaster will make an illusion of itself and the illusion will chop every enemy units in the 900 range and in the end, damages nearby enemies in 250 range.
Level1: 10 Damage and 25 final damage
Level2: 17 Damage and 50 final damage
Level3: 24 Damage and 75 final damage
Level4: 31 Damage and 100 final damage



Needs Unit Indexer



V1.0

Spell Made
V1.1

Fixed some mistakes
Added final damage
Added 200 range to the spell



  • Samuro Slam Setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set SS_Damage[1] = 10.00
      • Set SS_Damage[2] = 17.00
      • Set SS_Damage[3] = 24.00
      • Set SS_Damage[4] = 31.00
      • Set SS_Speed = 25.00
      • Set SS_Range_Spell = 900.00
      • Set SS_SpecialEffect_Path = Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
      • Set SS_SpecialEffect_Target_Path = Abilities\Spells\Other\Stampede\StampedeMissileDeath.mdl
  • Samuro Slam Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Samuro Slam
    • Actions
      • Set SS_Caster = (Triggering unit)
      • Set SS_Caster_Owner = (Owner of SS_Caster)
      • Set SS_Caster_Location = (Position of SS_Caster)
      • Set SS_Caster_Face_Angle = (Facing of SS_Caster)
      • Set SS_Level = (Level of Samuro Slam for SS_Caster)
      • Unit - Create 1 Blademaster Dummy for SS_Caster_Owner at SS_Caster_Location facing SS_Caster_Face_Angle degrees
      • Set SS_Dummy = (Last created unit)
      • Set SS_Dummy_ID = (Custom value of SS_Dummy)
      • Set SS_Dummy_Angle[SS_Dummy_ID] = SS_Caster_Face_Angle
      • Set SS_Loc1 = (Position of SS_Dummy)
      • Set SS_Dummy_Owner[SS_Dummy_ID] = SS_Caster_Owner
      • Set SS_Dummy_Range[SS_Dummy_ID] = SS_Range_Spell
      • Set SS_Dummy_Caster[SS_Dummy_ID] = SS_Caster
      • Set SS_Dummy_Level[SS_Dummy_ID] = SS_Level
      • Animation - Change SS_Dummy's vertex coloring to (100.00%, 100.00%, 100.00%) with 50.00% transparency
      • Animation - Play SS_Dummy's stand ready animation
      • Special Effect - Create a special effect attached to the weapon of SS_Dummy using SS_SpecialEffect_Path
      • Set SS_Dummy_SpecialEffect[SS_Dummy_ID] = (Last created special effect)
      • Unit Group - Add SS_Dummy to SS_UnitGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Samuro Slam Loop <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on Samuro Slam Loop <gen>
        • Else - Actions
      • Custom script: call RemoveLocation(udg_SS_Caster_Location)
      • Custom script: call RemoveLocation(udg_SS_Loc1)

  • Samuro Slam Loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in SS_UnitGroup and do (Actions)
        • Loop - Actions
          • Set SS_Dummy = (Picked unit)
          • Set SS_Dummy_ID = (Custom value of SS_Dummy)
          • Set SS_Loc1 = (Position of SS_Dummy)
          • Set SS_Loc2 = (SS_Loc1 offset by SS_Speed towards SS_Dummy_Angle[SS_Dummy_ID] degrees)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SS_Dummy_Range[SS_Dummy_ID] Equal to 600.00
            • Then - Actions
              • Animation - Play SS_Dummy's attack slam animation
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • SS_Dummy_Range[SS_Dummy_ID] Greater than 0.00
            • Then - Actions
              • Unit - Move SS_Dummy instantly to SS_Loc2
              • Set SS_Dummy_Range[SS_Dummy_ID] = (SS_Dummy_Range[SS_Dummy_ID] - SS_Speed)
              • Set SS_Dummy_Damage_UnitGroup = (Units within 100.00 of SS_Loc1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of SS_Dummy_Owner[SS_Dummy_ID]) Equal to True) and (((Matching unit)
              • Unit Group - Pick every unit in SS_Dummy_Damage_UnitGroup and do (Actions)
                • Loop - Actions
                  • Set SS_Dummy_Target = (Picked unit)
                  • Unit - Cause SS_Dummy_Caster[SS_Dummy_ID] to damage SS_Dummy_Target, dealing SS_Damage[SS_Dummy_Level[SS_Dummy_ID]] damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the chest of SS_Dummy_Target using SS_SpecialEffect_Target_Path
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyGroup(udg_SS_Dummy_Damage_UnitGroup)
            • Else - Actions
              • Unit - Remove SS_Dummy from the game
              • Unit Group - Remove SS_Caster from SS_UnitGroup
              • Special Effect - Destroy SS_Dummy_SpecialEffect[SS_Dummy_ID]
              • Special Effect - Create a special effect at SS_Loc2 using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
              • Special Effect - Destroy (Last created special effect)
              • Set SS_Dummy_Damage_UnitGroup = (Units within 250.00 of SS_Loc1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of SS_Dummy_Owner[SS_Dummy_ID]) Equal to True) and (((Matching unit)
              • Unit Group - Pick every unit in SS_Dummy_Damage_UnitGroup and do (Actions)
                • Loop - Actions
                  • Set SS_Dummy_Target = (Picked unit)
                  • Unit - Cause SS_Dummy_Caster[SS_Dummy_ID] to damage SS_Dummy_Target, dealing (25.00 x (Real(SS_Dummy_Level[SS_Dummy_ID]))) damage of attack type Spells and damage type Normal
                  • Special Effect - Create a special effect attached to the chest of SS_Dummy_Target using SS_SpecialEffect_Target_Path
                  • Special Effect - Destroy (Last created special effect)
              • Custom script: call DestroyGroup(udg_SS_Dummy_Damage_UnitGroup)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
            • Then - Actions
            • Else - Actions
          • Custom script: call RemoveLocation(udg_SS_Loc1)
          • Custom script: call RemoveLocation(udg_SS_Loc2)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in SS_UnitGroup) Equal to 0
        • Then - Actions
          • Trigger - Turn off (This trigger)
        • Else - Actions



Keywords:
Slam, Sword, Blood, Samuro, Orc, Blademaster, Chop, Slice, Cut, Grunt, Phoenix, Fire, last, final, damage
Contents

Samuro Slam V1.1 (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 14:24, 11th Feb 2014 BPower: Needs fix http://www.hiveworkshop.com/forums/spells-569/samuro-slam-v1-1-mui-247665/#post2485101

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

14:24, 11th Feb 2014
BPower:
Needs fix
http://www.hiveworkshop.com/forums/spells-569/samuro-slam-v1-1-mui-247665/#post2485101
 
Samuro Slam v1.0
In cast trigger you make same actin twice:

  • Set SS_Dummy_Owner[SS_Dummy_ID] = SS_Caster_Owner
  • Set SS_Dummy_Owner[SS_Dummy_ID] = SS_Caster_Owner
In loop you don't need Point[array] variables. You can just use normal point variable, because they get removed immediatly, and you dont refer to them at any other trigger.

  • Set SS_Dummy_Loc[SS_Dummy_ID] = (Position of SS_Dummy)
  • Set SS_Dummy_Loc2[SS_Dummy_ID] = (SS_Dummy_Loc[SS_Dummy_ID] offset by SS_Speed towards SS_Dummy_Angle[SS_Dummy_ID] degrees)
  • ....
  • ....
  • Custom script: call RemoveLocation(udg_SS_Dummy_Loc[udg_SS_Dummy_ID])
  • Custom script: call RemoveLocation(udg_SS_Dummy_Loc2[udg_SS_Dummy_ID])
In loop you forgot to change 'Picked Unit' to 'SS_Dummy'
  • Set SS_Dummy_Range[(Custom value of (Picked unit))] = (SS_Dummy_Range[(Custom value of (Picked unit))] - SS_Speed)
________________________________

Spell isnt very special, but looks not bad in game. I would add maybe something more special maybe.

Something like a explosion at end before blademaster disappears would make it more attractive for me. (just for example :csmile:)
 
Last edited:

Kazeon

Hosted Project: EC
Level 33
Joined
Oct 12, 2011
Messages
3,449
- needs unit indexer is not a feature :p
- dont use custom value
- use SetUnitX/Y
- there are some useless variable storings in the cast trigger
  • Set SS_Dummy_Owner[SS_Dummy_ID] = SS_Caster_Owner
=>
  • Set SS_Dummy_Owner[SS_Dummy_ID] = (Owner of SS_Caster)
- the distance and speed need to be configurable for each level. Also the AoE need to be configurable too
- there is ITE without any action inside the loop trigger
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
why it does need a Unit Indexer?, you can use some MUI Methods too like Dynamic or Indexing Array and Hashtables ( I think Indexing Array will fit in the spell not a hashtable ).

"- dont use custom value"
This is needed when using Unit Indexer.
  • Set SS_Dummy_Damage_UnitGroup = (Units within 250.00 of SS_Loc1 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) belongs to an enemy of SS_Dummy_Owner[SS_Dummy_ID]) Equal to True) and (((Matching unit)
Instead of this heavy long script, you can just filter the units inside of the unit group using the ITE ( If then else condition ).
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
    • (Number of units in SS_UnitGroup) Equal to 0
    • Then - Actions
    • Trigger - Turn off (This trigger)
    • Else - Actions
Checking if the group is empty is slow, you can just use integers as counters.

This is a quick review, if there's anything wrong or mistake in my review, you can vm me :). Sorry because I've forgot how to mod a spell in warcraft 3 now :3.
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
"- dont use custom value"
This is needed when using Unit Indexer.
He isn't manipulating the UnitUserData at all.
UnitIndexers are very powerful resources. There is nothing wrong in using them.

However the ForGroup loop isn't very efficient compared to an array with an index.
This one will most likely never happen. You have like 0 chance to hit excacly 600.00
  • SS_Dummy_Range[SS_Dummy_ID] Equal to 600.00
You damage units multiple times.
 
He isn't manipulating the UnitUserData at all.
UnitIndexers are very powerful resources. There is nothing wrong in using them.

However the ForGroup loop isn't very efficient compared to an array with an index.
This one will most likely never happen. You have like 0 chance to hit excacly 600.00
  • SS_Dummy_Range[SS_Dummy_ID] Equal to 600.00
You damage units multiple times.

Thank you for your comment, actually it's a 100% chance to get in 600 range :D
because every 0.03 sec it will do this: Range = Range - 25
and the first range is 900, and after .36 sec it will run the actions cause (12 * 25 = 300) and (900 - 300 = 600) and i have to point that the spell does multiply damage. It's like the Invoker's Chaos Meteor in DotA
 
Level 19
Joined
Mar 18, 2012
Messages
1,716
  • Configuration is lacking. You should add alpha (transparency), animations, ability ( looks cleaner and avoids permanent hex to dec conversion),
    dummy, damagetype, attacktype, ...
  • Dynamic indexing would be so much nice than your giant ForGroup loop. You also wouldn't need UnitIndexer anymore.
  • The warstomp string path should be stored into a variable
  • DamageDetection per se is not part of your spell it shouldn't be there.
  • You damage units multiple times, hence damage is directly related to the unit collision size. It's also a complete random value depending on the current movement of the target.
  • The hotkey is not to R as mentioned in the tooltip it is C.
  • The dummy abruptly vanishes, that looks kinda odd.
 
Top