Why dosnt this trigger work!?

Kahem

New Member
Reaction score
2
Events
Unit - A unit Is attacked
Conditions
(Attacking unit) Equal to unitHydra
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integerThreeHead Equal to 2
Then - Actions
Animation - Play unitHydra's slam animation
Set integerThreeHead = (integerThreeHead - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integerThreeHead Equal to 1
Then - Actions
Animation - Play unitHydra's spell animation
Set integerThreeHead = (integerThreeHead - 1)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integerThreeHead Equal to 0
Then - Actions
Unit - Remove Bloodlust - buff from unitHydra
Set integerTemp = (Random integer number between 1 and 100)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
integerTemp Less than or equal to ((Level of Three Heads for unitHydra) x 5)
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Real(integerTemp)) Less than or equal to ((Real((Level of Three Heads for unitHydra))) x 2.50)
Then - Actions
Set pointTemp = (Position of unitHydra)
Unit - Create 1 Dummy for playerHydraOwner at pointTemp facing Default building facing degrees
Unit - Hide (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Bloodlust to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust unitHydra
Set integerThreeHead = 2
Custom script: call RemoveLocation(udg_pointTemp)
Else - Actions
Set pointTemp = (Position of unitHydra)
Unit - Create 1 Dummy for playerHydraOwner at pointTemp facing Default building facing degrees
Unit - Hide (Last created unit)
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add Bloodlust to (Last created unit)
Unit - Order (Last created unit) to Orc Shaman - Bloodlust unitHydra
Set integerThreeHead = 1
Custom script: call RemoveLocation(udg_pointTemp)
Else - Actions
Else - Actions

basicly at level 12 (max) the hydra has a 100% chance to attack with 1 head (1 attack) a 60% chance to attack with 2 heads (2 attacks) and a 30% chance to attack with 3 heads (3 attacks)
ive set the dummy bloodlust to make it have 1000% attack speed.

can anyonw help pl0x?
 

Joccaren

You can change this now in User CP.
Reaction score
54
What do you need help with, what isn't working with your trigger?
 

Kahem

New Member
Reaction score
2
the only thing ive noticed about it since ive posted is that it leaks, thats all fixed now but it still dosnt work.
 

Yoshii

New Member
Reaction score
74
1: you need to learn to use
Trigger:
  • its hard for us to read if not example <div class="bbCodeBlock bbCodeBlock--screenLimited bbCodeBlock--code"><div class="bbCodeBlock-title">Trigger:</div><div class="wc3trigger"><ul class="wc3" id="wc3_1">
    • <li class="lasttree"><span class="default">bla bla</span></li>
    • </ul>
    • </div></div>
    • 2:I can see problem with the way the headinterger is set but thats not the main issue I think
    • 3: why are you hiding the unit? use a unit and remove its model or something, i dont think a unit that is hidden can cast a spell, beside you cant refer to a unit once you have hidden it as its gone the only way to refer to it would be to store the unit in a variable before its hidden.So basically your order hero part does nothing because there 1 if not 2 problem with refering to your hidden unit
    • 4: dont double post if noone replied yet within 24hours thats agaisnt rule
 

ZugZugZealot

New Member
Reaction score
33
Quote For Readability [QFR]
Trigger:
  • Events
    • Unit - A unit Is attacked
    • Conditions
      • (Attacking unit) Equal to unitHydra
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integerThreeHead Equal to 2
        • Then - Actions
          • Animation - Play unitHydra&#039;s slam animation
          • Set integerThreeHead = (integerThreeHead - 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integerThreeHead Equal to 1
        • Then - Actions
          • Animation - Play unitHydra&#039;s spell animation
          • Set integerThreeHead = (integerThreeHead - 1)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • integerThreeHead Equal to 0
        • Then - Actions
          • Unit - Remove Bloodlust - buff from unitHydra
          • Set integerTemp = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • integerTemp Less than or equal to ((Level of Three Heads for unitHydra) x 5)
            • Then - Actions
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • (Real(integerTemp)) Less than or equal to ((Real((Level of Three Heads for unitHydra))) x 2.50)
                • Then - Actions
                  • Set pointTemp = (Position of unitHydra)
                  • Unit - Create 1 Dummy for playerHydraOwner at pointTemp facing Default building facing degrees
                  • Unit - Hide (Last created unit)
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add Bloodlust to (Last created unit)
                  • Unit - Order (Last created unit) to Orc Shaman - Bloodlust unitHydra
                  • Set integerThreeHead = 2
                  • Custom script: call RemoveLocation(udg_pointTemp)
                • Else - Actions
                  • Set pointTemp = (Position of unitHydra)
                  • Unit - Create 1 Dummy for playerHydraOwner at pointTemp facing Default building facing degrees
                  • Unit - Hide (Last created unit)
                  • Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
                  • Unit - Add Bloodlust to (Last created unit)
                  • Unit - Order (Last created unit) to Orc Shaman - Bloodlust unitHydra
                  • Set integerThreeHead = 1
                  • Custom script: call RemoveLocation(udg_pointTemp)
            • Else - Actions
        • Else - Actions
 

Kahem

New Member
Reaction score
2
k, ill edit for now on.

im prety sure that hiden units can be referd to via trigger, how else do you unhide them?
and im prety sure they can cast spells
but i will take your advice and test the ability without hideing them.

"you need to learn to use
Trigger:
  • its hard for us to read if not example&quot;
    • and how do i do that?
    • &quot;2:I can see problem with the way the headinterger is set but thats not the main issue I think&quot;
    • whats the problem you see?
 

Yoshii

New Member
Reaction score
74
k, ill edit for now on.

im prety sure that hiden units can be referd to via trigger, how else do you unhide them?
and im prety sure they can cast spells
but i will take your advice and test the ability without hideing them.

"you need to learn to use
Trigger:
  • its hard for us to read if not example&quot;
    • and how do i do that?
    • &quot;2:I can see problem with the way the headinterger is set but thats not the main issue I think&quot;
    • whats the problem you see?
Trigger:
  • forget about the possible problem with headinterger it only looked at way before you posted the correct trigger that we can read.
    • and yes the only way to refer to a hidden unit is by first storing the unit in a variable then Hide it then refer to the variable when you want refer to the unit
    • a hidden cannot be refered to using picked unit, pick every unit,click ,whatever this is why I also think you cant order it to cast a spell but it may not be the case( i recall making the hidden/unhide stuff for people but not cant recall about ordering it to cast).
 

Kahem

New Member
Reaction score
2
thx Yoshii i appreciate the help

for other spells my hidden units cast...

well i tested the ability without hiding the units and it still didnt work
the hydra does attack with different animations tho...

anymore ideas as to why it dosnt work
 

Yoshii

New Member
Reaction score
74
thx Yoshii i appreciate the help

for other spells my hidden units cast...

well i tested the ability without hiding the units and it still didnt work
the hydra does attack with different animations tho...

anymore ideas as to why it dosnt work

try to change the ownership of the created dummy to your color and see if the unit has the ability/mana/requirement to cast the spell in the 1st place, if the dummy is created it mean your trigger is mostly correct
 

Kahem

New Member
Reaction score
2
nvm bout it man, i recreated it using dummy units, it works, just the item effects and damage ect will have to be triggered.
 

Joccaren

You can change this now in User CP.
Reaction score
54
If you were using 'Hide Unit' to make the dummy unable to be seen, there is an easier way. Change its model file path to .mdl
WE will not be able to find .mdl so it will display no model file. Then, just remove the shadow in the art section, give the unit locust and you'll be right.
 

reyghost

New Member
Reaction score
14
one minor thing i saw (i think because ur code is so long I may have passed over it)
is that you didnt set a default value for your three head integer so its start on 0 and if u - to it, it will go negative and no condition will be true.
 

Yoshii

New Member
Reaction score
74
one minor thing i saw (i think because ur code is so long I may have passed over it)
is that you didnt set a default value for your three head integer so its start on 0 and if u - to it, it will go negative and no condition will be true.

not true read again; even if he did not set a value and its 0 the trigger will run and change the 0 to a random number between 1 and 100 . its fine there are no problem
edit: I foresee condition problem if the random number greater than the number of head nothing will happen as the 2nd condition will not be run
 

reyghost

New Member
Reaction score
14
Yoshii we arent talking about the same one u mean integerTemp and I mean integerThreeHead. But anyway its true that doesnt really matter.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top