- Joined
- Mar 23, 2007
- Messages
- 302
Hi ,
i wanted to do a spell that destroys all trees and all stones
(and if i get rid of this even more stuff), after that returning
a number of what (trees and stones)
and how many of that was destroyed. problem is to do this in LOCALS -.- .
yeah this works but is not realy MUI, what if 2 players do this at same time,
i tryed it to do in local form but then i just got like 30 messages , this looks like that:
1 trees and 0 stones
1 trees and 0 stones
1 trees and 0 stones
0 trees and 1 stones
1 trees and 0 stones
1 trees and 0 stones
....
Could pls some one be that helpfully to show me how
i can turn this into local form?
i just dont get it how to combinate local form with "pick every" stuff...
(sry for gramatical misstakes)
i wanted to do a spell that destroys all trees and all stones
(and if i get rid of this even more stuff), after that returning
a number of what (trees and stones)
and how many of that was destroyed. problem is to do this in LOCALS -.- .
JASS:
globals
integer udg_trees = 0
integer udg_stones = 0
endglobals
function Trig_TerraGolem_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A000'
endfunction
function Trig_TerraGolem_Func001Func001C takes nothing returns boolean
return IsDestructableAliveBJ(GetEnumDestructable()) == true and GetDestructableTypeId(GetEnumDestructable()) == 'LTlt'
endfunction
function Trig_TerraGolem_Func001Func002C takes nothing returns boolean
return IsDestructableAliveBJ(GetEnumDestructable()) == true and GetDestructableTypeId(GetEnumDestructable()) == 'LTrc'
endfunction
function Msg takes string s returns nothing
call DisplayTextToForce ( GetPlayersAll (), s)
endfunction
function Trig_TerraGolem_Func001A takes nothing returns nothing
if ( Trig_TerraGolem_Func001Func001C() ) then
call KillDestructable( GetEnumDestructable() )
set udg_trees = udg_trees+1
elseif( Trig_TerraGolem_Func001Func002C() ) then
call KillDestructable( GetEnumDestructable() )
set udg_stones = udg_stones+1
endif
endfunction
function Trig_TerraGolem_Actions takes nothing returns nothing
call EnumDestructablesInCircleBJ( ( 700.00 + ( 30.00 * I2R(GetUnitAbilityLevelSwapped('A000', GetSpellAbilityUnit())) ) ), GetSpellTargetLoc(), function Trig_TerraGolem_Func001A )
call Msg (I2S(udg_trees) + " trees and " + I2S(udg_stones) + " stones")
set udg_trees = 0
set udg_stones = 0
endfunction
yeah this works but is not realy MUI, what if 2 players do this at same time,
i tryed it to do in local form but then i just got like 30 messages , this looks like that:
1 trees and 0 stones
1 trees and 0 stones
1 trees and 0 stones
0 trees and 1 stones
1 trees and 0 stones
1 trees and 0 stones
....
Could pls some one be that helpfully to show me how
i can turn this into local form?
i just dont get it how to combinate local form with "pick every" stuff...
(sry for gramatical misstakes)