• 🏆 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!

[GUI] Corruption

This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
Welcome to yet another spell that Chaosy (likely) will be too lazy to update.

l41m3NaUSWxeVABXO.gif

Description
The caster sends out corruptive waves of magic in all directions. All enemies hit got some of their life stolen.

How to import:
1. copy the dummy model to your map
2. copy the dummy unit to your map
3. copy all triggers but the 'this map only' ones


  • CR init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Hashtable - Create a hashtable
      • Set CR_hash = (Last created hashtable)
      • Set CR_area[1] = 550.00
      • Set CR_area[2] = 550.00
      • Set CR_area[3] = 550.00
      • Set CR_leach[1] = 0.03
      • Set CR_leach[2] = 0.05
      • Set CR_leach[3] = 0.10
      • Set CR_damage[1] = 50.00
      • Set CR_damage[2] = 75.00
      • Set CR_damage[3] = 100.00
      • Set CR_speed = 7.00
      • Set CR_ability = Corruption
      • Set CR_missile_number = 15
      • Set CR_effect = Abilities\Weapons\GargoyleMissile\GargoyleMissile.mdl
      • Set CR_detect_range = 50.00
      • Set CR_attack_type = Spells
      • Set CR_damage_type = Magic
      • -------- Do not modify bellow. --------
      • Set CR_SaveUsage = 4
  • CR cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to CR_ability
    • Actions
      • Custom script: local integer h
      • Custom script: local integer calc
      • Set CR_unit = (Triggering unit)
      • Custom script: set h = GetHandleId(udg_CR_unit)
      • For each (Integer A) from 1 to CR_missile_number, do (Actions)
        • Loop - Actions
          • Custom script: set calc = udg_CR_SaveUsage * bj_forLoopAIndex
          • Set CR_angle = ((360.00 / (Real(CR_missile_number))) x (Real((Integer A))))
          • Custom script: call SaveReal(udg_CR_hash, h, calc + 1, udg_CR_angle)
          • Custom script: call SaveReal(udg_CR_hash, h, calc + 2, GetUnitX(udg_CR_unit))
          • Custom script: call SaveReal(udg_CR_hash, h, calc + 3, GetUnitY(udg_CR_unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (CR_group is empty) Equal to True
        • Then - Actions
          • Trigger - Turn on CR loop <gen>
        • Else - Actions
      • Unit Group - Add CR_unit to CR_group
  • CR loop
    • Events
      • Time - Every 0.03 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in CR_group and do (Actions)
        • Loop - Actions
          • Custom script: local integer h
          • Custom script: local integer calc
          • Set CR_unit = (Picked unit)
          • Custom script: set h = GetHandleId(udg_CR_unit)
          • Custom script: set udg_CR_loc = Location(LoadReal(udg_CR_hash, h, udg_CR_SaveUsage + 2), LoadReal(udg_CR_hash, h, udg_CR_SaveUsage + 3))
          • For each (Integer CR_loop_integer) from 1 to CR_missile_number, do (Actions)
            • Loop - Actions
              • Custom script: set calc = udg_CR_SaveUsage * udg_CR_loop_integer
              • Custom script: set udg_CR_angle = LoadReal(udg_CR_hash, h, calc + 1)
              • Custom script: set udg_CR_distance = LoadReal(udg_CR_hash, h, calc + 4) + udg_CR_speed
              • Custom script: call SaveReal(udg_CR_hash, h, calc + 4, udg_CR_distance)
              • Set CR_loc2 = (CR_loc offset by CR_distance towards CR_angle degrees)
              • Special Effect - Create a special effect at CR_loc2 using CR_effect
              • Special Effect - Destroy (Last created special effect)
              • Custom script: set bj_wantDestroyGroup = true
              • Unit Group - Pick every unit in (Units within CR_detect_range of CR_loc2 matching (((Matching unit) belongs to an enemy of (Owner of CR_unit)) Equal to True)) and do (Actions)
                • Loop - Actions
                  • Custom script: local integer h = GetHandleId(udg_CR_unit)
                  • Custom script: local boolean b = LoadBoolean(udg_CR_hash, h, GetHandleId(GetEnumUnit()))
                  • Custom script: if not b then
                  • Set MS_Source1 = (Picked unit)
                  • Custom script: call SaveBoolean(udg_CR_hash, h, GetHandleId(udg_MS_Source1), true)
                  • Unit - Cause CR_unit to damage MS_Source1, dealing CR_damage[(Level of CR_ability for CR_unit)] damage of attack type CR_attack_type and damage type CR_damage_type
                  • Set MS_Target1 = CR_unit
                  • Set MS_Heal1 = ((Max life of (Picked unit)) x CR_leach[(Level of CR_ability for CR_unit)])
                  • Trigger - Run CR Missile Settings <gen> (ignoring conditions)
                  • Trigger - Run CreateMissile <gen> (checking conditions)
                  • Custom script: endif
              • Custom script: call RemoveLocation(udg_CR_loc2)
          • Custom script: call RemoveLocation(udg_CR_loc)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • CR_distance Greater than or equal to CR_area[(Level of CR_ability for CR_unit)]
            • Then - Actions
              • Custom script: call FlushChildHashtable(udg_CR_hash, h)
              • Unit Group - Remove CR_unit from CR_group
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (CR_group is empty) Equal to True
                • Then - Actions
                  • Trigger - Turn off (This trigger)
                • Else - Actions
            • Else - Actions


Credits
NameContridution

Killcide
GIF preview

Redscores
Missile System

Keywords:
Spell, dark, corruption, Chaosy, GUI,
Contents

Just another Warcraft III map (Map)

Reviews
08:10, 14th Sep 2015 BPower: Requires proper tooltip.
Dr Super Good
Was brought to my attention that this spell fails some of the requirements to be approved. The following issues must be resolved before the spell map can be approved. The map description fields must be set to attempt to uniquely identify the map...
Level 19
Joined
Mar 18, 2012
Messages
1,716
Can you give a link to the Missile System?

in cast you could use CR_unit instead of GetTriggerUnit() within the loop.

Use an integer variable instead of bj_forLoopAIndex.

if b == false then --> if not b then.

Custom script: call SaveBoolean(udg_CR_hash, GetHandleId(udg_CR_unit), GetHandleId(GetEnumUnit()), true) --> you have the handle id stored in "h", use the variable.

The missile config stuff shouldn't be hardcoded.
 

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,182
The loop trigger, those configurations before
  • Trigger - Run CreateMissile <gen> (checking conditions)
(those set variables) would be better if moved into a separate trigger, allowing users to spot it easier.

I see, that is a fair point. I will do that.

Can you give a link to the Missile System?

in cast you could use CR_unit instead of GetTriggerUnit() within the loop.

Use an integer variable instead of bj_forLoopAIndex.

if b == false then --> if not b then.

Custom script: call SaveBoolean(udg_CR_hash, GetHandleId(udg_CR_unit), GetHandleId(GetEnumUnit()), true) --> you have the handle id stored in "h", use the variable.

The missile config stuff shouldn't be hardcoded.

1. Sure, will do. (Done)
2. Not you too! but fine.(Done)
3. *nods* (Done)
4. Thanks! will fix (Done)
5. will do something about that. (Done)
 
Noticed a few small details that were missed when you updated this:
- You use GetTriggerUnit() in the cast trigger when you already have CR_unit set to the triggering unit
- Trigger names should have the same prefix as your variables (CR Loop for example)
- Small note that it'd make sense to put the missile setup in with the init trigger, just reduces the amount of triggers to import at no cost
- Collision size of the outgoing projectiles should be configurable
- Add a version number to the resource
- You reference picked unit twice in the loop (once to assign to a variable, the other time to damage it)
- You also reference picked unit again when you remove it from the unit group when it should be CR_unit
- Change the folder name to match the spell, people need to be able to easily import and locate the files later
 

Deleted member 247165

D

Deleted member 247165

Extraordinary and well made spell! I have no objections for it. 5/5 from me.
 
Level 3
Joined
Apr 30, 2011
Messages
22
I am getting compile error from these two lines :
set udg_MS_tempreal[2] = ParabolaZ(udg_MS_MissileH2[udg_MS_Integer[3]], udg_MS_tempreal[1], udg_MS_distance[udg_MS_Integer[3]])
set udg_MS_tempreal[4] = (ZFacing(udg_MS_MissileH2[udg_MS_Integer[3]], udg_MS_tempreal[1], udg_MS_distance[udg_MS_Integer[3]])+90)
''Symbol not declared''
(ParabolaZ)
(ZFacing)
what does it means? and how can I fix it?
 
Level 3
Joined
Apr 30, 2011
Messages
22
function ParabolaZ takes real h, real d, real x returns real
return (4 * h / d) * (d - x) * (x / d)
endfunction

function ZFacing takes real h, real d, real x returns real
return Atan(4*h/d - 8*h*x/(d*d))*bj_RADTODEG+0.5
endfunction
Thanks alot!
 
Level 2
Joined
Aug 8, 2019
Messages
7
Hey, I was wondering if I had done something wrong, because I transfered this spell to my map and everything worked except for the healing part. Then I went back to the original map and reduced the health of the caster there to 1% and casted the spell. It seems the healing does not work on that map ethier. Any chance someone could help me fix it? Thanks
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,178
Was brought to my attention that this spell fails some of the requirements to be approved.

The following issues must be resolved before the spell map can be approved.
  1. The map description fields must be set to attempt to uniquely identify the map from other maps. This is to allow the map to be more easily searchable from the in game custom game list. Just another "Just another Warcraft III map" is not useful for searching. Player 2 must also be at least an empty slot to allow the map to be started. Although this is not the recommended approach to test spell maps, some people might prefer doing this which is why it must be supported.
  2. The singular contained ability must function as described. It claims that it heals the caster for a percentage of affected enemy unit life but it does not when cast. The visuals appear indicating that it should, but no healing occurs.
  3. The test map should allow every aspect of an ability to be tested without modification. There currently is no way to damage the ability test unit to check if the ability healing mechanic is working correctly. This is likely why issue 2 was not detected sooner.
 
Top