jnZ
I
- Reaction score
- 64
can someone make me a working jass trigger for the following gui one:
i dont know how to make it MUI because you cant use locals in loops in gui
the trigger creates everytime a unit of type bomb explodes a explosion that expands into North, east, south and west (explosion range depends on a firepower global integer)
people who know bomberman should know what i mean.
i dont know if this is hard or not however ill greatly +rep
Code:
Bomb Explosion
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Bomb
Actions
Set BombExplosionPoint[1] = (Position of (Triggering unit))
For each (Integer LoopBombExplosion[1]) from 1 to PowerupFire[1], do (Actions)
Loop - Actions
Set BombExplosionPoint[(LoopBombExplosion[1] + 1)] = (BombExplosionPoint[1] offset by ((128.00 x (Real(LoopBombExplosion[1]))), 0.00))
For each (Integer LoopBombExplosion[1]) from 1 to PowerupFire[1], do (Actions)
Loop - Actions
Set BombExplosionPoint[(LoopBombExplosion[1] + 13)] = (BombExplosionPoint[1] offset by ((-128.00 x (Real(LoopBombExplosion[1]))), 0.00))
For each (Integer LoopBombExplosion[1]) from 1 to PowerupFire[1], do (Actions)
Loop - Actions
Set BombExplosionPoint[(LoopBombExplosion[1] + 25)] = (BombExplosionPoint[1] offset by (0.00, (-128.00 x (Real(LoopBombExplosion[1])))))
For each (Integer LoopBombExplosion[1]) from 1 to PowerupFire[1], do (Actions)
Loop - Actions
Set BombExplosionPoint[(LoopBombExplosion[1] + 37)] = (BombExplosionPoint[1] offset by (0.00, (128.00 x (Real(LoopBombExplosion[1])))))
Special Effect - Create a special effect at BombExplosionPoint[1] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 70.00 at BombExplosionPoint[1], dealing 10.00 damage of attack type Spells and damage type Magic
For each (Integer LoopBombExplosion[1]) from 2 to (PowerupFire[1] + 1), do (Actions)
Loop - Actions
Set TempRegionA = (Region centered at BombExplosionPoint[LoopBombExplosion[1]] with size (140.00, 140.00))
Set TempGroupA = (Units in TempRegionA matching (((Matching unit) is Undead) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempGroupA is empty) Equal to True
Then - Actions
Special Effect - Create a special effect at BombExplosionPoint[LoopBombExplosion[1]] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 70.00 at BombExplosionPoint[LoopBombExplosion[1]], dealing 10.00 damage of attack type Spells and damage type Magic
Else - Actions
Custom script: exitwhen true
Custom script: call RemoveRect( udg_TempRegionA )
Custom script: call DestroyGroup( udg_TempGroupA )
For each (Integer LoopBombExplosion[1]) from 13 to (PowerupFire[1] + 13), do (Actions)
Loop - Actions
Set TempRegionA = (Region centered at BombExplosionPoint[LoopBombExplosion[1]] with size (140.00, 140.00))
Set TempGroupA = (Units in TempRegionA matching (((Matching unit) is Undead) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempGroupA is empty) Equal to True
Then - Actions
Special Effect - Create a special effect at BombExplosionPoint[LoopBombExplosion[1]] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 70.00 at BombExplosionPoint[LoopBombExplosion[1]], dealing 10.00 damage of attack type Spells and damage type Magic
Else - Actions
Custom script: exitwhen true
Custom script: call RemoveRect( udg_TempRegionA )
Custom script: call DestroyGroup( udg_TempGroupA )
For each (Integer LoopBombExplosion[1]) from 25 to (PowerupFire[1] + 25), do (Actions)
Loop - Actions
Set TempRegionA = (Region centered at BombExplosionPoint[LoopBombExplosion[1]] with size (140.00, 140.00))
Set TempGroupA = (Units in TempRegionA matching (((Matching unit) is Undead) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempGroupA is empty) Equal to True
Then - Actions
Special Effect - Create a special effect at BombExplosionPoint[LoopBombExplosion[1]] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 70.00 at BombExplosionPoint[LoopBombExplosion[1]], dealing 10.00 damage of attack type Spells and damage type Magic
Else - Actions
Custom script: exitwhen true
Custom script: call RemoveRect( udg_TempRegionA )
Custom script: call DestroyGroup( udg_TempGroupA )
For each (Integer LoopBombExplosion[1]) from 37 to (PowerupFire[1] + 37), do (Actions)
Loop - Actions
Set TempRegionA = (Region centered at BombExplosionPoint[LoopBombExplosion[1]] with size (140.00, 140.00))
Set TempGroupA = (Units in TempRegionA matching (((Matching unit) is Undead) Equal to True))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(TempGroupA is empty) Equal to True
Then - Actions
Special Effect - Create a special effect at BombExplosionPoint[LoopBombExplosion[1]] using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
Unit - Cause (Triggering unit) to damage circular area after 0.00 seconds of radius 70.00 at BombExplosionPoint[LoopBombExplosion[1]], dealing 10.00 damage of attack type Spells and damage type Magic
Else - Actions
Custom script: exitwhen true
Custom script: call RemoveRect( udg_TempRegionA )
Custom script: call DestroyGroup( udg_TempGroupA )
For each (Integer LoopBombExplosion[1]) from 1 to 49, do (Actions)
Loop - Actions
Custom script: call RemoveLocation( udg_BombExplosionPoint[udg_LoopBombExplosion[1]] )
i dont know how to make it MUI because you cant use locals in loops in gui
the trigger creates everytime a unit of type bomb explodes a explosion that expands into North, east, south and west (explosion range depends on a firepower global integer)
people who know bomberman should know what i mean.
i dont know if this is hard or not however ill greatly +rep