Moderator
M
Moderator
22:32, 16th Jun 2010
Hanky:
Very simple. But well, useful enough.
Hanky:
Very simple. But well, useful enough.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
(3 ratings)
Approved
Circle Impulse

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Circle Impulse

Actions


Set CI_Caster = (Casting unit)


Set CI_Target = (Target unit of ability being cast)


Set CI_Player = (Owner of CI_Caster)


Set CI_Point = (Position of CI_Target)


-------- We aren't Damaging a thing, only the dummies do, so that's the idea , the eyecandy? look at it your self then ^^ --------


-------- The Dummies are here AND the casting effects are all here!(Loops now!) --------


For each (Integer A) from 1 to 7, do (Actions)



Loop - Actions




Set CI_Point2 = (CI_Point offset by 650.00 towards (51.42 x (Real((Integer A)))) degrees)




Unit - Create 1 Spellcaster for CI_Player at CI_Point2 facing CI_Point




Unit - Add a 1.50 second Generic expiration timer to (Last created unit)




Unit - Add Water Impulse to (Last created unit)




Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster)




Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point




Custom script: call RemoveLocation( udg_CI_Point2 )


-------- Null it --------


Custom script: call RemoveLocation( udg_CI_Point )


Set CI_Caster = No unit


Set CI_Target = No unit
JJudgement

Events


Unit - A unit Starts the effect of an ability

Conditions


(Ability being cast) Equal to Judgement

Actions


Set JM_Caster = (Casting unit)


Set JM_Target = (Target unit of ability being cast)


Set JM_Player = (Owner of JM_Caster)


Set JM_Point = (Position of JM_Target)


For each (Integer A) from 1 to 3, do (Actions)



Loop - Actions




Set JM_Point2 = (JM_Point offset by 350.00 towards (120.00 x (Real((Integer A)))) degrees)




Unit - Create 1 Spellcaster for JM_Player at JM_Point2 facing JM_Point




Unit - Add Judgement (DUMMY) to (Last created unit)




Unit - Set level of Judgement (DUMMY) for (Last created unit) to (Level of Judgement for JM_Caster)




Unit - Order (Last created unit) to Neutral Naga Sea Witch - Forked Lightning JM_Target




Unit - Add a 3.00 second Generic expiration timer to (Last created unit)




Special Effect - Create a special effect at JM_Point2 using Abilities\Spells\Human\ThunderClap\ThunderClapCaster.mdl




Special Effect - Destroy (Last created special effect)




Custom script: call RemoveLocation( udg_JM_Point2 )


Custom script: call RemoveLocation( udg_JM_Point )


Set JM_Caster = No unit


Set JM_Target = No unit
Great, alot of leaks. No need to use arrayed variables as they are infact instant cast. Make a loop please to reduce the amount of code and fix the point leaks.
fix the point leaks as baassee said
use loops instead of copy&pasting the same stupid part of code 20 times
why do you pause/unpause the caster/target?
terrain deformation lags hard on big maps with lots of doodads in multilayer
don't use unnecessary imports and give credits for ALL things you imported
Attached Thumbnails
edit:
omg....use a variable then lol
(for loop integer i from 0 to 6 do actions
set angle = convert integer to real(integer i) * 60.00
or something like that)


Remove the arrays on the variables. It is not needed.
Is too simple, I vote for rejection
Posted by War Golum
Some tips and suggestions for improvement:Judgment has the same flaws as Chrone Impulse, therefore i won´t bother to repeat myself. Further i´m missing proper documentation for this spell and as stated above the custom imports are more than just redundant, you may remove the fast before this gets rejected.
- The spell is MPI (Multi Player Instanceable), which won´t be accepted. Only fully MUI (Multi Unit Instanceable) spells are allowed.
- In case you want to stick to MPI then please save (Player number of (Owner of (Casting unit))) to an integer. That would make your code more readable.
- Your script runs instantly therefore pausing the caster and the target is obsolete. You should remove those actions.
- Use your own integer instead of Integer-A as stated above.
- You have point leaks in your loop. You need to remove CI_Point2 ad the end of the loop.
Please do not double post (you obviously know where the Edit-Button is) and don´t spam those smileys, its just awful.
~TNT
Chrone Impulse
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Circle Impulse
Actions
Set CI_Integer_Read = (Player number of (Owner of (Casting unit)))
Set CI_Caster[CI_Integer_Read] = (Casting unit)
Set CI_Target[CI_Integer_Read] = (Target unit of ability being cast)
Set CI_Player[CI_Integer_Read] = (Owner of CI_Caster[(Player number of (Owner of (Casting unit)))])
Set CI_Point = (Position of CI_Target[CI_Integer_Read])
-------- Pause the units first! --------
Unit - Pause CI_Caster[CI_Integer_Read]
Unit - Pause CI_Target[CI_Integer_Read]
-------- We aren't Damaging a thing, only the dummies do, so that's the idea , the eyecandy? look at it your self then ^^ --------
-------- The Dummies are here AND the casting effects are all here!(Loops now!) --------
For each (Integer A) from 1 to 7, do (Actions)
Loop - Actions
Set CI_Point2 = (CI_Point offset by 650.00 towards (51.42 x (Real((Integer A)))) degrees)
Unit - Create 1 Spellcaster for CI_Player[CI_Integer_Read] at CI_Point2 facing (Position of CI_Target[CI_Integer_Read])
Unit - Add a 1.50 second Generic expiration timer to (Last created unit)
Unit - Add Water Impulse to (Last created unit)
Unit - Set level of Water Impulse for (Last created unit) to (Level of Circle Impulse for CI_Caster[CI_Integer_Read])
Unit - Order (Last created unit) to Orc Tauren Chieftain - Shockwave CI_Point
-------- Unpause it --------
Unit - Unpause CI_Caster[CI_Integer_Read]
Unit - Unpause CI_Target[CI_Integer_Read]
-------- Null it --------
Custom script: call RemoveLocation( udg_CI_Point )
Custom script: call RemoveLocation( udg_CI_Point2 )
Set CI_Caster[CI_Integer_Read] = No unit
Set CI_Target[CI_Integer_Read] = No unit
So remove the arrays as you say, it is MUI then you dont need the arrays. (It is instant)
the spells are instant, so it is MUI not MPI(yes it is MPI if it HAS wait action!)
Set JM_Point2 = (JM_Point offset by 350.00 towards (120.00 x (Real((Integer A)))) degrees)
One leak :
JM_POINT offset by 350 towards .. ...
Set JM_Point2 = (JM_Point offset by 350.00 towards (120.00 x (Real((Integer A)))) degrees)
What, does not leak? He sets a new point. If it would leak it would have looked like "position of (something) offset by ..."
No need to null player variables?

