Twilice Posted November 21, 2007 The triggered immolation is based on Unit - Damage area right? But how do you make it to only target enemies? Go to top Share this post Link to post
Twilice Posted November 21, 2007 Think I don't need help with the post above anymore. But how do I make my dummy caster cast a certian spell? I want a tower to cast a customesid flamestrike, but I can only get it to cast the originall. Edit: Fixed the Flamestrike but not the one above, how did you do? Go to top Share this post Link to post
Guest Timberwolf Posted November 22, 2007 The triggered immolation is based on Unit - Damage area right? But how do you make it to only target enemies? Don't the towers in ele TD have armor that makes them invincible? If so, maybe they never did make it target only enemies. Go to top Share this post Link to post
Twilice Posted November 22, 2007 Only some towers. The ordinary towers have their armor, Ex. fire tower has fire armor. Go to top Share this post Link to post
Karawasa Posted November 23, 2007 You cannot make "damage area," target only enemies as far as I know (at least in GUI). What you need to do instead is damage units individually. This can be accomplished by first picking all units within X range of what you specify (e.g. target point of spell being cast) matching conditions you want (e.g. are an enemy). Then, you want to use the damage unit function to cause specified unit (e.g. caster) to damage picked unit. If you are familiar with eliminating memory leaks, then I'm sure you know how to do so by modifying the steps above. If you have questions, let me know and I will post code (I didn't now because my computer is not hooked up yet). Go to top Share this post Link to post
Twilice Posted November 23, 2007 I will in a couple of days when I got free time (dads weekend)<< Will be edited. Btw What was the art model you used to the hydro tower? I just want the model not the trigger. Go to top Share this post Link to post
Guest emjlr3 Posted November 23, 2007 this is what I use requires NewGen: // Damage enemies in an areaglobals private group dam_grp = CreateGroup()endglobalsfunction FilterIsEnemy takes nothing returns boolean return IsUnitEnemy(GetFilterUnit(), bj_groupEnumOwningPlayer) and GetUnitState(GetFilterUnit(),UNIT_STATE_LIFE)>.405endfunction function DamageEnemiesArea takes unit damageUnit, real radius, real x, real y, real amount, attacktype attackType, damagetype damageType returns nothing local unit u set bj_groupEnumOwningPlayer = GetOwningPlayer(damageUnit) call GroupEnumUnitsInRange(dam_grp, x, y, radius, Condition(function FilterIsEnemy)) loop set u = FirstOfGroup(dam_grp) exitwhen u == null call GroupRemoveUnit(dam_grp,u) call UnitDamageTarget(damageUnit,u,amount,false,false,attackType,damageType,null) endloopendfunction Go to top Share this post Link to post