HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Why it dosen't work?

07-07-2006, 10:57 PM#1
CrashLemon
I would like my Axe Toss (Storm Bolt) to bounce to one enemy at lvl 3. I know its an easy spell, but I can't find any Event Respond - Buffed Unit so I'm trying with Triggering Unit and it dosen't work... Here is my code :

Trigger:
Axe Toss
Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Axe Toss
Collapse Actions
Set Axe_Toss_Target = (Triggering unit)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Axe Toss for (Casting unit)) Equal to 3
Collapse Then - Actions
Unit - Create 1 Axe Toss (dummy) for (Owner of (Casting Unit)) at (Position of Axe_Toss_Target) facing Default building facing degress
Set Axe_Toss = (Last created unit)
Collapse Unit Group - Pick every unit in (Random 1 units from (Units within 800.00 of (Position of Axe_Toss_Target))) and do (Actions)
Collapse Loop - Actions
Unit - Order Axe_Toss to Human Mountain King - Storm Bolt (Picked unit)
Wait 2.00
Unit - Remove Axe_Toss from the game
Set Axe_Toss = No unit
Collapse Else - Actions
Do Nothing
Set Axe_Toss_Target = No Unit

Thanks :)
07-07-2006, 11:31 PM#2
Daxtreme
You must set Axe_Toss_Target as the target unit of ability being cast.

Also, did you add Storm Bolt to the dummy ? doesn't seem so!
07-07-2006, 11:31 PM#3
Alevice
You may need your dummy to force learn storm bolt.

Trigger:
Hero - Set Axe_Toss Hero-level to 10, Hide level-up graphics
Hero - Learn skill for Axe_Toss: Human Mountain King - Storm Bolt
07-07-2006, 11:35 PM#4
aquilla
Try creating one dummy for each picked unit, order it to stormbolt the picked unit and add an expiration timer to the dummy. When you just loop it like you have done now the dummy won't have enough time to cast stormbolt on each target

Edit: I saw you just had one target in the pick every unit thing >8) Is Axe Toss an ability with a target? Then do what Daxtreme said
07-07-2006, 11:39 PM#5
Daxtreme
> Unit Group - Pick every unit in (Random 1 units from (Units within 800.00 of (Position of Axe_Toss_Target))) and do (Actions)

I think this will sometimes pick the unit at the position of Axe_Toss_Target... You don't want this to happen
07-07-2006, 11:59 PM#6
Alevice
Just check if picked unit equals to triggering unit
07-08-2006, 12:02 AM#7
CrashLemon
Ok, I changed (Triggering Unit) to (Target of ability being cast) and it still dosen't work. The problem is that the dummy target is not created.

Quote:
> Unit Group - Pick every unit in (Random 1 units from (Units within 800.00 of (Position of Axe_Toss_Target))) and do (Actions)

I think this will sometimes pick the unit at the position of Axe_Toss_Target... You don't want this to happen

P.S. thanks for the info.
07-08-2006, 02:39 AM#8
Daxtreme
Quote:
Originally Posted by CrashLemon
Ok, I changed (Triggering Unit) to (Target of ability being cast) and it still dosen't work. The problem is that the dummy target is not created.



P.S. thanks for the info.

The trigger seems ok in terms of placing the dummy. I think it is created, but doesn't cast the spell. Did you add the spell to the dummy ? BTW you should use a generic expiration timer instead of waiting and removing the dummy in the trigger.

P.S. you should update your trigger with what it is at the moment
07-08-2006, 07:28 PM#9
CrashLemon
Quote:
Originally Posted by Daxtreme
The trigger seems ok in terms of placing the dummy. I think it is created, but doesn't cast the spell. Did you add the spell to the dummy ? BTW you should use a generic expiration timer instead of waiting and removing the dummy in the trigger.

P.S. you should update your trigger with what it is at the moment

For the dummy,
I changed his model to an Abomination one is when he spawn, Ill see it.

Second, Yes the spell is on the Dummy.

Finally, I added the expiration timer but it still dosent work

Here is the code:
Trigger:
Collapse Events
Unit - A unit Starts the effect of an ability
Collapse Conditions
(Ability being cast) Equal to Axe Toss
Collapse Actions
Set Axe_Toss_Target = (Target unit of ability being cast)
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
(Level of Axe Toss for (Casting unit)) Equal to 3
Collapse Then - Actions
Unit - Create 1 Axe Toss (dummy) for (Owner of (Casting unit)) at (Position of Axe_Toss_Target) facing Default building facing degrees
Set Axe_Toss = (Last created unit)
Unit - Add a 5.00 second Generic expiration timer to Axe_Toss
Collapse Unit Group - Pick every unit in (Random 1 units from (Units within 1000.00 of (Position of Axe_Toss_Target) matching ((Unit-Type of (Matching Unit)) Not equal to Axe Toss (dummy)))) and do (Actions)
Collapse Loop - Actions
Unit - Order Axe_Toss to Human Mountain King - Storm Bolt (Picked Unit)
Set Axe_Toss = No Unit
Collapse Else - Actions
Do nothing
07-08-2006, 08:02 PM#10
Alevice
Add the couple of actions I posted. Unless he has storm bolt added by default, there is no way it will cast it.
07-08-2006, 08:18 PM#11
CrashLemon
Quote:
Originally Posted by Alevice
Add the couple of actions I posted. Unless he has storm bolt added by default, there is no way it will cast it.

Yes Storm Bolt is added by default, no cooldown or mana cost and the unit is not a hero so he doesn't have to learn it... As I said, the problem is that the Dummy does not spawn.
07-08-2006, 09:28 PM#12
Daxtreme
Well only problem I could see is that you could set every variable in your trigger at the beginning. It once fixed one of my problem

Like :

set Temp_Point = (Position of (Axe_Toss_Target)
set Unit_Group_Var = (Units within 1000.00 of (Position of Axe_Toss_Target) matching ((Unit-Type of (Matching Unit)) Not equal to Axe Toss (dummy))))

etc. And try it using the variables.

Also try changing "Starts the effect of an ability" to "Begins casting an ability"

I know these seem pointless changes but try it.
07-08-2006, 10:29 PM#13
CrashLemon
Quote:
Originally Posted by Daxtreme
Well only problem I could see is that you could set every variable in your trigger at the beginning. It once fixed one of my problem

Like :

set Temp_Point = (Position of (Axe_Toss_Target)
set Unit_Group_Var = (Units within 1000.00 of (Position of Axe_Toss_Target) matching ((Unit-Type of (Matching Unit)) Not equal to Axe Toss (dummy))))

etc. And try it using the variables.

Also try changing "Starts the effect of an ability" to "Begins casting an ability"

I know these seem pointless changes but try it.

Ill try but the "Begins casting an ability" will f*ck up everything cause I want it to Bounce so I want the trigger to start when it HITS the target not when the CAster cast the spell.
07-09-2006, 03:56 AM#14
Daxtreme
You can give your dummy Animation - Backswing point a long time so it will "wait" before casting the spell (instead of inserting a wait in the trigger)