| 03-20-2009, 07:58 PM | #1 |
Hi, i want to male an Mass Polymorph spell, i used the CasterSystem to do it, it works but ... only on one target on the area, it don't sheep the other units. I used "Mass slow" from CasterSystem map as sample JASS:function Mass_Sheep_Conditions takes nothing returns boolean return ( GetSpellAbilityId() == 'A003' ) endfunction function Mass_Sheep_Actions takes nothing returns nothing local location loc =GetSpellTargetLoc() //The target location local unit u =GetTriggerUnit() local integer l local real area call PolledWait( 0.75 ) //For appearance sake, it looks better with this delay. set l = GetUnitAbilityLevel( u,'A003') set area = 100.0 + l*50.0 // prepare the Area argument call CasterCastAbilityLevelAOELoc( GetOwningPlayer(u), 'A005', l ,"polymorph", loc, area, false, true) // // CasterCastAbilityLevelAOELoc has got 2 variations from CasterCastAbilityAOE , first of all it uses // a location variable, second it has an extra argument called level to set the level of the ability // to cast. // // In this case we are using the spell target location and the level of the spell as those arguments. // // // Notice that our area argument uses a formula based on level, it is 150. for level 1, 200 for level 2, etc // // It is a negative instant spell to cast so the last values are false and true. // call RemoveLocation(loc) set loc=null set u=null endfunction //=========================================================================== function InitTrig_Mass_Sheep takes nothing returns nothing set gg_trg_Mass_Sheep = CreateTrigger( ) call TriggerRegisterAnyUnitEventBJ( gg_trg_Mass_Sheep, EVENT_PLAYER_UNIT_SPELL_EFFECT ) call TriggerAddCondition( gg_trg_Mass_Sheep, Condition( function Mass_Sheep_Conditions ) ) call TriggerAddAction( gg_trg_Mass_Sheep, function Mass_Sheep_Actions ) endfunction A003 is the renamed copy of "Mass slow" from CasterSystem map. A005 is a multilevel polymorph with no mana cost |
| 03-21-2009, 02:21 AM | #2 |
I am pretty sure Vexorian himself has said the Caster System is vastly outdated and shouldn't really be used. I could be wrong on that though. He is making a new system for casting however, maybe when Vex sees this he can point you in the correct direction. I am unsure if it would be better to fix what you currently have or to rewrite it under a different method, I am not yet versed enough in optimization to have a definite answer. |
| 03-21-2009, 05:31 AM | #3 |
i dunno but look up xecast, a component of the system 'xe'. |
| 03-21-2009, 05:53 PM | #4 |
Found, i just forgot to remove the 3sec cooldown to the polymorph spell -_-'* I should try xe too |
| 03-21-2009, 05:55 PM | #5 |
Found, just forgot to remove the 3sec cooldown should try xe too |
