HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

"Kaboom!" Problem, or Trigger Problem?

04-07-2008, 03:47 AM#1
Hydrolisk
I've got this triggered ability that does not work as it should. It should spawn 3x(Level of Hero's ability) little guys that try to use a custom "Kaboom!" ability around a target point. However, only a few are summoned and only sometimes do they move! And, they NEVER cast their custom "Kaboom!" ability (which costs NO mana)!

-The actual effect is supposed to be that the little guys are summoned and they "Kaboom!" a random point near the target point (base Hero ability is Breath of Fire; should I change to something else?).

Here are two triggers, including a failsafe (it all fails anyways though).

Ability Effect

Trigger:
Earthen Flame
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Earthen Flames
Collapse Actions
Set AAearthenflame_p2[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
Set AAearthenflame_u[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Collapse For each (Integer A) from 1 to (3 x (Level of Earthen Flames for (Triggering unit))), do (Actions)
Collapse Loop - Actions
Set AAearthenflame_p[(Player number of (Owner of (Triggering unit)))] = (Position of AAearthenflame_u[(Player number of (Owner of (Triggering unit)))])
Set AAearthenflame_p3[(Player number of (Owner of (Triggering unit)))] = (AAearthenflame_p2[(Player number of (Owner of (Triggering unit)))] offset by (Random real number between 25.00 and 125.00) towards (Random angle) degrees)
Unit - Create 1 Earthen Flame (Dummy) for (Owner of (Triggering unit)) at AAearthenflame_p[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
Wait 0.11 seconds
Unit - Order (Last created unit) to Neutral - Kaboom! AAearthenflame_p3[(Player number of (Owner of (Triggering unit)))]
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 1
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p[1])
Custom script: call RemoveLocation (udg_AAearthenflame_p3[1])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 2
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p[2])
Custom script: call RemoveLocation (udg_AAearthenflame_p3[2])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 3
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p[3])
Custom script: call RemoveLocation (udg_AAearthenflame_p3[3])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 4
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p[4])
Custom script: call RemoveLocation (udg_AAearthenflame_p3[4])
Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 1
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p2[1])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 2
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p2[2])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 3
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p2[3])
Collapse Else - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Player number of (Owner of (Triggering unit))) Equal to 4
Collapse Then - Actions
Custom script: call RemoveLocation (udg_AAearthenflame_p2[4])
Else - Actions


Failsafe

Trigger:
Earthen Flame Failsafe
Collapse Events
Time - Every 0.33 seconds of game time
Conditions
Collapse Actions
Set AAearthenflame_ug = (Units of type Earthen Flame (Dummy))
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Number of units in AAearthenflame_ug) Greater than 0
Collapse Then - Actions
Collapse Unit Group - Pick every unit in AAearthenflame_ug and do (Actions)
Collapse Loop - Actions
Unit - Order (Picked unit) to Neutral - Kaboom! AAearthenflame_p3[(Player number of (Owner of (Picked unit)))]
Else - Actions
Custom script: call DestroyGroup (udg_AAearthenflame_ug)

Attached Files
File type: w3x(4)Monolith 2 vAlpha.w3x (1.9 MB)
04-07-2008, 08:06 AM#2
tamisrah
Your clean-up can be simplyfied to this afaik:
Trigger:
Custom script: call RemoveLocation(udg_AAearthenflame_p[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])

To your actual problem I have to questions:
1st Did you try your trigger without those waits?
2nd Did you try the trigger without your failsafe?

My last idea would be that you're using that global loop index in some other trigger, which might lead to your occurency of random number of units spawned.
This could be confirmed by removing the waits. If the spawing works fine then, your loop index is the problem.

To your failsafe:
I don't believe that it's a good idea to order any unit that frequently. If you're lucky the reason for your peoblem is that the units are not able to follow that order and therefore just remain where they are.
04-07-2008, 08:29 AM#3
Silvenon
Wow, I read the first post and those questions tamisrah asked were exactly the same thing I would ask. How does Kaboom! work exaclty? Couldn't you use an original one?
04-07-2008, 10:06 PM#4
Hydrolisk
(Thanks for the script, tamisrah. I needed that. :P +REP)

Kaboom! accepts point and unit orders, and is a suicide ability. I cannot use the original one since it deals huge damage in a large area and deals x3 damage to structures, so I needed a custom one. (Also, I can't cannibalize the original Kaboom! data because my map is based on a melee map.)

Working on the ability.
04-07-2008, 10:15 PM#5
Burning Rose
Do the Custom Units have the "Suicidal" Flag on(Unit Classification). I don't know if that would affect it, it's just a guess.
04-07-2008, 10:23 PM#6
darkwulfv
...You can't cannibalize the original Kaboom! data? Lolz. Typo.

Uh, hmm... Do the mini units have the suicidal unit tag?
04-22-2008, 09:25 PM#7
Hydrolisk
Trigger:
Earthen Flame
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Earthen Flames
Collapse Actions
Set AAearthenflame_p2[(Player number of (Owner of (Triggering unit)))] = (Target point of ability being cast)
Set AAearthenflame_u[(Player number of (Owner of (Triggering unit)))] = (Triggering unit)
Collapse For each (Integer A) from 1 to (3 x (Level of Earthen Flames for (Triggering unit))), do (Actions)
Collapse Loop - Actions
Set AAearthenflame_p[(Player number of (Owner of (Triggering unit)))] = (Position of AAearthenflame_u[(Player number of (Owner of (Triggering unit)))])
Set AAearthenflame_p3[(Player number of (Owner of (Triggering unit)))] = (AAearthenflame_p2[(Player number of (Owner of (Triggering unit)))] offset by (Random real number between 25.00 and 125.00) towards (Random angle) degrees)
Unit - Create 1 Earthen Flame (Dummy) for (Owner of (Triggering unit)) at AAearthenflame_p[(Player number of (Owner of (Triggering unit)))] facing Default building facing degrees
Unit - Order (Last created unit) to Neutral - Kaboom! AAearthenflame_p3[(Player number of (Owner of (Triggering unit)))]
Wait 0.11 seconds
Custom script: call RemoveLocation (udg_AAearthenflame_p[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
Custom script: call RemoveLocation (udg_AAearthenflame_p3[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])
Custom script: call RemoveLocation (udg_AAearthenflame_p2[GetConvertedPlayerId(GetOwningPlayer(GetTriggerUnit()))])

There is my current trigger. The ability still doesn't work properly though.
04-22-2008, 10:30 PM#8
Vexorian
I think kaboom needs a certain extra passive ability to work, check the goblin sappers' unit in the object editor and look for more abilities.
04-25-2008, 03:24 PM#9
Hydrolisk
Nope, doesn't look like it.

Might it have something to do with it have Suicidal, Summoned, and Walkable flags set?
04-25-2008, 03:36 PM#10
Malf
Suicidal only makes it so that if you right click a unit, it will use Kaboom on that.
04-25-2008, 03:39 PM#11
TheSecretArts
lets test that
Collapse JASS:
set Malf = Suicidal
call AddAbility(Malf, Kaboom)
call Order(Malf, Vexorian, 'smart')
but seriously, try adding suicidal
04-25-2008, 03:43 PM#12
Malf
It's a fact.
04-25-2008, 03:51 PM#13
Hydrolisk
I already have tried adding Suicidal.
04-25-2008, 04:08 PM#14
Vexorian
New guess: The problem is with last created unit, people shouldn't use such thing after waits... + the second one fails because your dummies use locust.
04-25-2008, 04:15 PM#15
Hydrolisk
I disabled the Wait but it still didn't work.

EDIT: It seems that the units move up to and have been ordered to Kaboom! the target point but when they reach the point, they don't Kaboom!. Do you know why it would do that?

BTW: The units will auto-Kaboom!. The Kaboom! ability's target flags are: Debris, Enemy, Ground, Structure, Tree, and Ward.