Why this triggered ability not working?

nardretor

New Member
Reaction score
6
I've been trying this for hours and I still dont get it.
Trigger:
  • Lightning Sword Elemental
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type Elemental Sword [Lightning]) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 25
        • Then - Actions
          • Unit - Create 1 Lightning Sword Bearer (Dummy Caster) for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
          • Unit - Order (Attacking unit) to Neutral - Firebolt (Attacked unit)
        • Else - Actions


Why it is not working? I know it is easy.
 

jackall

You can change this now in User CP.
Reaction score
37
ok... ill tell you a secret: when i did my first spell i tried that it didnt work, but when i added it via triggers it worked
 

nardretor

New Member
Reaction score
6
ok? i'll show you this...
Trigger:
  • Dummy Tornado
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Real Tornado
    • Actions
      • Set Temp_Torn1 = (Target point of ability being cast)
      • Set Temp_Torn2 = (Position of (Casting unit))
      • Unit - Create 1 Lord of Sorcery (Dummy Caster) for (Owner of (Casting unit)) at Temp_Torn2 facing Default building facing degrees
      • Unit - Set level of |CFFFF0303Tornado|R for (Last created unit) to (Level of Real Tornado for (Casting unit))
      • Unit - Order (Last created unit) to Neutral Naga Sea Witch - Tornado Temp_Torn1
      • Wait 60.00 seconds
      • Unit - Remove (Last created unit) from the game
      • Custom script: call RemoveLocation (udg_Temp_Torn1)
      • Custom script: call RemoveLocation (udg_Temp_Torn2)

this worked... but with the new condition i put, it aint working anymore... and i already did adding it via triggers
 

reyghost

New Member
Reaction score
14
wich unit is the one that has firebolt? the dummy caster or the real unit that has the sword?
 

Yoshii

New Member
Reaction score
74
ok? i'll show you this...
Trigger:
  • Dummy Tornado
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Real Tornado
    • Actions
      • Set Temp_Torn1 = (Target point of ability being cast)
      • Set Temp_Torn2 = (Position of (Casting unit))
      • Unit - Create 1 Lord of Sorcery (Dummy Caster) for (Owner of (Casting unit)) at Temp_Torn2 facing Default building facing degrees
      • Unit - Set level of |CFFFF0303Tornado|R for (Last created unit) to (Level of Real Tornado for (Casting unit))
      • Unit - Order (Last created unit) to Neutral Naga Sea Witch - Tornado Temp_Torn1
      • Wait 60.00 seconds
      • Unit - Remove (Last created unit) from the game
      • Custom script: call RemoveLocation (udg_Temp_Torn1)
      • Custom script: call RemoveLocation (udg_Temp_Torn2)

this worked... but with the new condition i put, it aint working anymore... and i already did adding it via triggers

I hope you know you cant refer to last created unit after using a wait time it will most likely incur bug in your map later on.
 

reyghost

New Member
Reaction score
14
Yoshii do really wait actions incur in bugs?? if u have just 1 wait, the very first action of ur trigger and then no more will that bug ??
sorry for the off-topic
 

Joccaren

You can change this now in User CP.
Reaction score
54
Yoshii do really wait actions incur in bugs?? if u have just 1 wait, the very first action of ur trigger and then no more will that bug ??
sorry for the off-topic

Yes, If another unit is created in the 60 second wait, it will become the last created unit and therefore be removed instead of the dummy. You will need to use variables to fix this.
 

nardretor

New Member
Reaction score
6
Trigger:
  • Lightning Sword Elemental
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • ((Attacking unit) has an item of type Elemental Sword [Lightning]) Equal to True
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 25
        • Then - Actions
          • Unit - Create 1 Lightning Sword Bearer (Dummy Caster) for (Owner of (Attacking unit)) at (Position of (Attacking unit)) facing Default building facing degrees
          • Unit - Order (Last created unit) to Neutral - Firebolt (Attacked unit)
        • Else - Actions


That still doesn't work... The dummy caster has the firebolt... and still it doesnt cast

And... please do not mind about that trigger i put on my 3rd post... i have a different problem...
 

Joccaren

You can change this now in User CP.
Reaction score
54
Try testing it with a 100% chance of happening. It may be that at or below 25 is never being reached.
 

nardretor

New Member
Reaction score
6
Well... before i put the actions on the Else -Actions part, i tested the action, Game - Display Text trigger... it works... there is a 25% chance of the text appears... but with this dummy casting, it aint working...

And btw, you are correct... I have to use variables on my other dummy casting trigger. Thanks.
 

Joccaren

You can change this now in User CP.
Reaction score
54
Still try with 100% chance. I once made an ability with a 30% chance of activating every 3 seconds but it never activated in the half hour I sat there watching it. When I made it 100%, it worked. In the end I set it to 80%, it hit most of the time but sometimes didn't. (This spell was triggered)
 

nardretor

New Member
Reaction score
6
Oh.. it really doesnt work... why?! Maybe the ability is a Unit Ability? Maybe because its level limit is 1?
 

Joccaren

You can change this now in User CP.
Reaction score
54
Try orb of lightning (new) ability. It gives a chance to cast any targeted ability whilst attacking.
 

reyghost

New Member
Reaction score
14
Listen to black sheep, check the firebolt ability in the object editor: mana cost, cooldown, allowed targets,as well as the dumy caster,if hes got the ability,all these non-trigger related issues, because the trigger sounds fine,though still need leak fixes,expiration timer and all that.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top