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

Winterstar v1.3

Hi everybody on the hive!
This is my first spell i upload here on the hive, but not the last.
I hope you like it, because it did my best to bring you a spell.
The spell is created for- and used in my map, Dalanar RPG.

Winterstar
Hurls cold stars of ice in all directions around the Hydromancer, dealing 70/140/210 damage and freezing enemy units hit by the icecold winter stars.
The spell should be MUI and leakless, but if you find any bugs please say me.

Credits:
Demongrip - Help with triggering
Naitsirk - Help with making spell MUI
XombeR - Found leak in Map triggers
Roflcopter - Found position leak

Please give credits if used in your map!

Keywords:
Winter, star, Winterstar, x-omg-x, ice, cold, freeze, snow, water, elemental, element, mui, leakless, v1.3
Contents

Winterstar (Map)

Reviews
11:30, 7th Oct 2009 TriggerHappy187: I really like this spell visually, good job. It seems you have fixed all of the leaks (as well as the unneeded unit group), so I can approve this.

Moderator

M

Moderator

11:30, 7th Oct 2009
TriggerHappy187:

I really like this spell visually, good job.

It seems you have fixed all of the leaks (as well as the unneeded unit group), so I can approve this.
 
Level 3
Joined
Oct 4, 2009
Messages
42
(17:15 GMT+1) downloading...
(17:19 GMT+1) EDIT

*** EDIT ***
Ok, the spell it self has no leaks and works fine!
I would give the spell a 3.7/5

--- REASON ---
1: The FX works fine, so it's a [10/10 (1/5)]
2: There are no leaks and it's MUI since it's instant [10/10 (1/5)]
3: The spell is not that original and there are kinda lots of different versions of it, so its a [5/10 (0.5/5)]
4: You could add some more description to the spell and add a cooldown triggered by the ESC button instead of it being "no cooldowned" as spell... [2/10 (0.2/5)]
5: Overall: The spell works and is leakfree and MUI [1/10 (1/5)]

--- ERRORS ---
I found some leaks in the "map" triggers, I know it's not really a part of the spell that's why it did not come with in the review.
Here are the solutions:
  • Map1
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to True
    • Actions
      • Set Temp_Point = (Position of (Dying unit))
      • Hero - Instantly revive (Dying unit) at Temp_Point, Show revival graphics
      • Custom script: call RemoveLocation(udg_Temp_Point)
Add variables to set the point and then remove it using Custom Scripts.

  • Map2
    • Events
      • Unit - A unit Dies
    • Conditions
      • ((Dying unit) is A Hero) Equal to False
      • (Unit-type of (Dying unit)) Not equal to Dummy
    • Actions
      • Wait 10.00 seconds
      • Set Temp_Point = (Position of (Dying unit))
      • Special Effect - Create a special effect at Temp_Point using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Unit - Create 1 (Unit-type of (Dying unit)) for (Owner of (Dying unit)) at Temp_Point facing Default building facing degrees
      • Custom script: call RemoveLocation(udg_Temp_Point)
Same here...

--- OTHER ---
It's good for being a first spell on the hive from you!
Keep it up dude!
+rep for a working first spell!
 
Level 9
Joined
Nov 25, 2008
Messages
194
5: Overall: The spell works and is leakfree and MUI [1/10 (1/5)]

I don't have to get this, do I?

Anyway wth is up with:
  • Custom Script : local unit udg_SD_Caster
and those 30 dummys, are they really neccesary? T_T

then random point is kinda ugly, use some math to make a nice circle.

And besides it does leak.

31 points per cast.

However, a very creative use of SFX.

And as far as i know, regions (areas) happen to leak too.
I'd generally prefer a point with random angle.
 
Level 7
Joined
Sep 8, 2009
Messages
90
The spell is good visually.Now on to the triggering:
Well roflcoptor says it all.Instead of making those 30 dummys and the unit group u can simply just make an integer variable and make For each integer(variable) from 1 to 30 do actions.Also the region variable can be replaced with a point with polar offser variable for the for each integer action
Example:
Set Point=WS_Point(or whatever variable is your caster point) offset by 300 towards ?? degrees.This can be the point of the dummy cast since it is 300 range further from the caster.You can just experiment with it.
With the degrees well it`s simple too just make a real variable and set it to 0.Then in the for each integer loop set the real like that:
Set Real=Real +360/30
Here you are done and can make it easier and more understanding to the users.Also I suggest you to add some documentation.
If you don`t understand how to make that just pm me I`ll explain you further.
 
Wow thanks for the good comments.

@XombeR: Okay will fix the leaks in map triggers

@Rolfcopter: Yes, the 30 dummies is neccesary. About the region leak, i will try to make some research and if it leaks i will fix it.

@Demongrip: As i said before the dummies gives it a better effect. Whatever, maybe i will change it to FEO. Try to cast the spell some times without any enemies around you and you will see the lines of stars are random. Thats why i did do the dummies.

Anyways, thanks for the good comments and your reviews. I will try to improve myself and my spells and come up with some more soon.
 
Level 9
Joined
Nov 25, 2008
Messages
194
Wow thanks for the good comments.

@XombeR: Okay will fix the leaks in map triggers

@Rolfcopter: Yes, the 30 dummies is neccesary. About the region leak, i will try to make some research and if it leaks i will fix it.

@Demongrip: As i said before the dummies gives it a better effect. Whatever, maybe i will change it to FEO. Try to cast the spell some times without any enemies around you and you will see the lines of stars are random. Thats why i did do the dummies.

Anyways, thanks for the good comments and your reviews. I will try to improve myself and my spells and come up with some more soon.

So they ARE supposed to shoot in random directions? WTF?
 
Level 11
Joined
Apr 29, 2007
Messages
826
Srsly guys, stop complaining about stuff that really can be fixed within seconds by yourself. I could just come and say OMG LOOK THIS IS BETTER WTF DID THIS GUY DO I MADE IT MORE EFFICIENTLY
He did his best, so appreciate it. (No, this doesn't include telling him that stuff leaks, because that is actually important)

JASS:
    #include "YourName.j"

scope Winterstar initializer init
{

    #define
    {
        ABILITY         = 'A001'
        INTERVAL        = 0.02
        RADIUS          = 50
        MAX_DISTANCE    = 500
        EFFECT_COUNT    = 18
        DAMAGE          = GetUnitAbilityLevel(.caster, ABILITY)*300*INTERVAL
        MAX_EXECUTIONS  = 20
        EFFECT          = "Abilities\\Spells\\Undead\\FrostNova\\FrostNovaTarget.mdl"
    }
    
    private keyword Frozen
    
    private struct Winterstar
    {
        unit caster
        float cur
        float dist
        
        static timer t = new timer
        static int total = 0
        static new data
        static group enum = new group
        static boolexpr bool = null
        static thistype create(unit caster)
        {
            thistype this = new thistype
            .caster = caster
            .dist = MAX_DISTANCE/MAX_EXECUTIONS
            .cur = .dist
            
            if .total == 0
            {
                TimerStart(.t, INTERVAL, true, function thistype.work)
            }
            
            .data[.total++] = this
            
            return this
        }
        
        private static void work()
        {
            int i = -1
            do
            {
                break (++i >= .total)
                thistype this; this = .data[i]
                float x
                float y
                float a = 0
                int q = -1
                do
                {
                    break (++q >= EFFECT_COUNT-1)
                    x = GetUnitX(.caster)+(.cur+GetRandomReal(0,50))*Cos(a)
                    y = GetUnitY(.caster)+(.cur+GetRandomReal(0,50))*Sin(a)
                    DestroyEffect(AddSpecialEffect("Abilities\\Spells\\Human\\ManaFlare\\ManaFlareMissile.mdl", x, y))
                    GroupEnumUnitsInRange(.enum, x, y, RADIUS, .bool)
                    unit u
                    do
                    {
                        u = FirstOfGroup(.enum)
                        break (u == null)
                        if IsUnitEnemy(u, GetOwningPlayer(.caster)) && !IsUnitType(u, UNIT_TYPE_DEAD)
                        {
                            UnitDamageTarget(.caster, u, DAMAGE, true, false, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL, null)
                            Frozen.create(u, FROZEN_TIME)
                            DestroyEffect(AddSpecialEffect(EFFECT, GetUnitX(u), GetUnitY(u)))
                        }
                        GroupRemoveUnit(.enum, u)
                    }
                    a += 2*bj_PI/(EFFECT_COUNT-1)
                }
                .cur += .dist
                if .cur >= MAX_DISTANCE
                {
                    .total--
                    .data[i] = .data[.total]
                    .destroy()
                }
            }
            
            if .total == 0 {PauseTimer(.t)}
        }
    }
    
    #define
    {
        FROZEN_INTERVAL     = 0.01
        FROZEN_TIME         = GetUnitAbilityLevel(.caster, ABILITY)
        FROZEN_ANIM_SPEED   = 0
        FROZEN_RED          = 255
        FROZEN_GREEN        = 255
        FROZEN_BLUE         = 255
        FROZEN_EFFECT       = "Abilities\\Spells\\Undead\\FreezingBreath\\FreezingBreathTargetArt.mdl"
        FROZEN_ATTACHMENT   = "origin"
    }
    
    private struct Frozen
    {
        unit target
        float time
        float max
        effect fx
        
        timer t = new timer
        
        static hashtable hash
        static group frozen = new group
        
        private static void onInit()
        {
            .hash = InitHashtable()
        }
        
        static thistype create(unit target, float time)
        {
            thistype this
            if HaveSavedInteger(.hash, GetHandleId(target), 0)
            {
                this = LoadInteger(.hash, GetHandleId(target), 0)
            }
            else
            {
                this = new thistype
                .target = target
                .fx = AddSpecialEffectTarget(FROZEN_EFFECT, target, FROZEN_ATTACHMENT)
                SetUnitTimeScale(target, FROZEN_ANIM_SPEED)
                SetUnitVertexColor(target, FROZEN_RED, FROZEN_GREEN, FROZEN_BLUE, 255)
                GroupAddUnit(.frozen, target)
                SaveInteger(.hash, GetHandleId(target), 0, this)
                SaveInteger(.hash, GetHandleId(.t), 0, this)
                TimerStart(.t, FROZEN_INTERVAL, true, function thistype.work)
            }
            
            .time = 0
            .max = time
            
            return this
        }
        
        private static void work()
        {
            thistype this = LoadInteger(.hash, GetHandleId(GetExpiredTimer()), 0)
            SetUnitPosition(.target, GetUnitX(.target), GetUnitY(.target))
            .time = .time+FROZEN_INTERVAL
            if .time >= .max || IsUnitType(.target, UNIT_TYPE_DEAD)
            {
                .destroy()
            }
        }
        
        private void onDestroy()
        {
            PauseTimer(.t)
            DestroyTimer(.t)
            FlushChildHashtable(.hash, GetHandleId(.target))
            FlushChildHashtable(.hash, GetHandleId(.t))
            SetUnitTimeScale(.target, 1)
            SetUnitVertexColor(.target, 255, 255, 255, 255)
            DestroyEffect(.fx)
            GroupRemoveUnit(.frozen, .target)
        }
    }
    
    private void work()
    {
        if GetSpellAbilityId() == ABILITY
        {
            Winterstar.create(GetTriggerUnit())
        }
    }
    
    private void init()
    {
        trigger trg = new trigger
        TriggerRegisterAnyUnitEventBJ(trg, EVENT_PLAYER_UNIT_SPELL_EFFECT)
        TriggerAddAction(trg, function work)
    }
}
NO YOU CANT COMPILE THIS BECAUSE ITS CJASS AND YOU DONT HAVE YOURNAME.J
 
Top