HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

[OLY] Divine Smite

08-14-2008, 02:38 AM#1
TKF
Divine/Light Spell. My best spell idea so far. (no imports, no a real INGAME model!) But I'm noob and need some help...

Hidden information:
Divine/Light

Summons a divine hammer from the heavens and smites upon the puny foes on the ground, dealing 700 (400 the hammer itself) damage on direct hit with the hammer and units hit by the hammer suffers 3 seconds stun. The shockwave from the hammer does 300. damage. Has 750 casting range.

Be careful to not smite yourself!

Targeting: AOE Ground
Spell Type: Normal Cast

THe hammer comes from above, smite, then it goes up again.





This trigger starts the hammer event and the smash. It takes 1 second.
Trigger:
Hammer Cast
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Divine Smite
Collapse Actions
Set TempPoint1 = (Position of (Triggering unit))
Set TempPoint2 = (Target point of ability being cast)
Set TempPoint3 = (TempPoint2 offset by -256.00 towards (Angle from TempPoint1 to TempPoint2) degrees)
Unit - Create 1 Dymmu for (Owner of (Triggering unit)) at TempPoint2 facing Default building facing degrees
Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
Unit - Add Divine Hammer Smash to (Last created unit)
Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
Unit - Create 1 Mega Hammer Dummy for (Owner of (Triggering unit)) at TempPoint3 facing (Angle from TempPoint1 to TempPoint2) degrees
Animation - Change (Last created unit)'s animation speed to 0.50% of its original speed
Animation - Change (Last created unit)'s size to (900.00%, 900.00%, 900.00%) of its original size
Animation - Play (Last created unit)'s birth animation
Unit - Add a 7.00 second Generic expiration timer to (Last created unit)
Set Hammer[(Player number of (Owner of (Triggering unit)))] = (Last created unit)
Unit - Add Crow Form to (Last created unit)
Unit - Remove Crow Form from (Last created unit)
Animation - Change (Last created unit) flying height to 4700.00 at 0.00
Animation - Change (Last created unit) flying height to 200.00 at 3300.00
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)
Custom script: call RemoveLocation (udg_TempPoint3)
Wait 1.70 seconds
Animation - Change Hammer[(Player number of (Owner of (Triggering unit)))] flying height to 6000.00 at 1500.00


This trigger starts when the hammer damage has taken effect
Trigger:
Holy Wave
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Divine Hammer Smash
Collapse Actions
Set TempPoint1 = (Position of (Triggering unit))
Set TempPoint2 = (TempPoint1 offset by 256.00 towards (Random angle) degrees)
Unit - Create 1 Dymmu for (Owner of (Triggering unit)) at TempPoint2 facing (Facing of (Triggering unit)) degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Add Hammer Shockwave to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Unit - Create 1 Dymmu for (Owner of (Triggering unit)) at TempPoint2 facing (Facing of (Triggering unit)) degrees
Unit - Add a 4.00 second Generic expiration timer to (Last created unit)
Unit - Add Hammer Shockwave (Allied damage) to (Last created unit)
Unit - Order (Last created unit) to Night Elf Warden - Fan Of Knives
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)
Collapse For each (Integer A) from 1 to 36, do (Actions)
Collapse Loop - Actions
Set TempPoint1 = (Position of (Triggering unit))
Set TempPoint2 = ((Position of (Last created unit)) offset by 15.00 towards (10.00 x (Real((Integer A)))) degrees)
Unit - Create 1 Dymmu for (Owner of (Triggering unit)) at TempPoint1 facing (10.00 x (Real((Integer A)))) degrees
Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
Unit - Add Holywave (Effect) to (Last created unit)
Unit - Order (Last created unit) to Undead Dreadlord - Carrion Swarm TempPoint2
Custom script: call RemoveLocation (udg_TempPoint1)
Custom script: call RemoveLocation (udg_TempPoint2)


This is done in GUI

I've overseen leak(s) here, since this spell affects performance, and I can't find it myself. I've looked over it several times, but suffers from "trigger blindness" and can't see leaks :S

A secondary hammer appears randomly also, so i put a temporary countermeasure against that until i can find the source of that problem.
08-14-2008, 04:28 AM#2
Anopob
You create a unit and, as far as I can tell, do many actions with Last Created Unit (the unit) and THEN set the variable to it. Why don't you set the var first and then make all the last created units the var?
08-14-2008, 04:53 AM#3
Blubb-Tec
You're using the War Stomp, and, like Thunder Clap, it creates a terrain deformation, which lags HORRIBLY. workaround is damaging the units yourself, using a loop.
08-14-2008, 05:35 AM#4
Strilanc
Might want to fix the thread title to say OLY instead of ILY.
08-14-2008, 09:52 AM#5
Pyrogasm
Quote:
Originally Posted by Strilanc
Might want to fix the thread title to say OLY instead of ILY.
I changed it.
08-14-2008, 06:00 PM#6
TKF
Quote:
Originally Posted by Anopob
You create a unit and, as far as I can tell, do many actions with Last Created Unit (the unit) and THEN set the variable to it. Why don't you set the var first and then make all the last created units the var?
I think responding to last unit is faster action, rather than using the variable. But I'm not sure of this is faster, but that what I think. The variable is being used after the wait


Quote:
Originally Posted by Blubb-Tec
You're using the War Stomp, and, like Thunder Clap, it creates a terrain deformation, which lags HORRIBLY. workaround is damaging the units yourself, using a loop.
Removing the war stomp, doesn't change the horrible lagg caused by this spell. It's barely significant. It must be sort of point leak or something like that in the triggers...
08-14-2008, 06:23 PM#7
Sophismata
Quote:
Originally Posted by TKF
I think responding to last unit is faster action, rather than using the variable. But I'm not sure of this is faster, but that what I think. The variable is being used after the wait

I'm new at this, but, as I recall:

1. When you call the last unit, you're calling a function that is then using a global variable.

2. Every time you call this unit, you're repeating that function.

3. If you just assign the unit to the variable, then you're only calling the function once.

4. As a further benefit, if a new unit gets created while the trigger is running, it won't change the return on the Last Created Unit call.


Basically, if you're only using the Last Unit once, then just call it. Otherwise, assign it to a variable.
08-14-2008, 06:24 PM#8
Blubb-Tec
I don't see a periodic timer there, so a leak will not be the cause. Especially because you're already only using points that you destroy again. Try taking out those 36 created effect-dummies, and see if the lag gets less. Or just take the optional parts out until you finde the one that causes the lag.
08-14-2008, 07:18 PM#9
Tukki
In the new patch there was something that made the Shockwave abililty lag pretty much I think. Try to remove the nova-casting and see if it still lags.
08-14-2008, 07:29 PM#10
Anitarf
Leaks can lag the game up, that's true, but they don't do it when they first occur, but later when they have the time to build up. If your spell is when you cast it, that's not leaks, that's either too much graphical effects/terrain deformations or a code issue such as heavy calculations or many units being created, or both.
08-14-2008, 07:36 PM#11
TKF
I can't figure out why 2 hammers do occur! This trigger only create 1, where do other other be created from???
08-14-2008, 09:34 PM#12
Pyrogasm
Perhaps it is part of the model itself...?