Crazy_Dead
New Member
- Reaction score
- 24
Nice...
meh... I've seen this before actually... More efficient method, but I've seen this done a couple times already. Maybe we're just tired of duplicates.
.
if this.fxpath != null then
call DestroyEffect( this.fxpath )
set this.fxpath = null
endif
.
if this.originData.sec >= this.originData.dur or /*
*/ ( tempX*tempX+tempY*tempY ) > this.radius_45 or /*
*/ IsUnitType( this.originData.caster, UNIT_TYPE_DEAD ) or
<Other stuff>
return true
else
if ( tempX*tempX+tempY*tempY ) > this.radius_80 then
//call Damage_Pure( this.originData.source, this.target, this.dps )
call UnitDamageTargetEx( this.originData.source, this.target, this.dps, true, true, /*
*/ ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, null )
static if DO_DMG_SFX then
call DestroyEffect( AddSpecialEffectTarget( DAMAGE_EFFECT, this.target, "chest" ) )
endif
endif
endif
return false
.
if this.originData.sec >= this.originData.dur or /*
*/ ( tempX*tempX+tempY*tempY ) > this.radius_45 or /*
*/ IsUnitType( this.originData.caster, UNIT_TYPE_DEAD ) or
<Other stuff>
return true
endif
if ( tempX*tempX+tempY*tempY ) > this.radius_80 then
//call Damage_Pure( this.originData.source, this.target, this.dps )
call UnitDamageTargetEx( this.originData.source, this.target, this.dps, true, true, /*
*/ ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, null )
static if DO_DMG_SFX then
call DestroyEffect( AddSpecialEffectTarget( DAMAGE_EFFECT, this.target, "chest" ) )
endif
endif
return false
if <conditions> then
<actions>
return <value>
else
<other actions>
endif
if <conditions> then
<actions>
return <value>
endif
<other actions>
'Blade Barrier - Target' should be made possible by changing a value in the configurable globals, rather than having to create a struct in a different trigger.
No configurable number of blades per level? No blood effects when a unit is sliced up by the blades?
Also, not every bracket, name, type and equals sign needs to be aligned. Honest.
call SetSoundVolume( s, thistype.INLINED_VOLUME )
call SetSoundPosition( s, this.cx, this.cy, GetUnitFlyHeight( this.caster ) )
call StartSound( s )
call KillSoundWhenDone( s )
And all the structs, functions and globals should be private. If the structs are private, then the individual members and methods no longer need a private prefix.
> [ljass]// Note: Some sounds cannot be played rapidly. See thread: http://www.thehelper.net/forums/forumdisplay.php?f=42[/ljass]
What thread?
> [ljass]// Blade will be created at BLADE_AOE + GetRandomReal( -20, 20 )[/ljass]
BLADE_AOE? Where?
Static if's don't work outside of methods or functions. So using them around a global block will never remove the global block, even if it's false.
JASS:if <conditions> then <actions> return <value> endif <other actions>
If you are a super scarer of leaking, nulling it is okay, nothing wrong with it.
(Setting to null takes the same speed as calling an empty function)
If memory serves, you can make runes cast spells. So that's no problem. For 'commands', add the spell, cast it, remove it. Three short lines of code. Besides that, it's not really about length, just more about the spell following standard conventions.
Not when they die, but when they're actually damaged by it. It'd be a nice (and easy) option to add, and it looks silly without blood when there are 20 blades slashing through someone.