Attack problem

Xialian

Member
Reaction score
8
Hey there. Got a little problem with a unit, who attacks. He attacks, and then a trigger is supposed to go +1 and level up an ability he has. Now, the problem is that this doesn't seem to happen. The trigger I'm using is as follows:
Trigger:
  • Essence of Magic build
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Player 7 (Green)
      • (Attacking unit) Equal to HyperAssassin
    • Actions
      • Set HASpellPower = (Intelligence of HyperAssassin (Include bonuses))
      • If (EssenceOfMagicCOUNT Equal to 3) then do (Unit - Cause HyperAssassin to damage (Attacked unit), dealing ((Real(SpellPower)) x 0.50) damage of attack type Chaos and damage type Universal) else do (Do nothing)
      • If (EssenceOfMagicCOUNT Equal to 4) then do (Set EssenceOfMagicCOUNT = 1) else do (Do nothing)
      • Set EssenceOfMagicCOUNT = (EssenceOfMagicCOUNT + 1)
      • Unit - Set level of Essence of Magic for HyperAssassin to EssenceOfMagicCOUNT

Any suggestions to why it doesn't work?
 

vypur85

Hibernate
Reaction score
803
Because the attacking unit doesn't have the Essence of Magic ability?
This is suggested based on the assumption that all other things in the trigger work as intended.

Also assuming that HASpellPower is actually not SpellPower.
 

Xialian

Member
Reaction score
8
It sure does. 3 levels of Attribute Bonus, as it only serves as a tooltip for the passive, which is completely in the triggers. The rank doesn't increase, and the damage isn't dealt.
 

vypur85

Hibernate
Reaction score
803
> The rank doesn't increase, and the damage isn't dealt.
Basically everything doesn't work then. The trigger does not run at all. I'd suggest you to look into the conditions again.
First, which trigger is HyperAssassin initialised.
Second, make sure attacked units are really owned by player 7.

> the damage isn't dealt
I actually edited the post above but you replied too fast. Lol.
HASpellPower and SpellPower. Did you insert the wrong integer variable?

This line of trigger:
  • If (EssenceOfMagicCOUNT Equal to 4) then do (Set EssenceOfMagicCOUNT = 1) else do (Do nothing)
  • Set EssenceOfMagicCOUNT = (EssenceOfMagicCOUNT + 1
By doing this, you will never get the value of 1 for EssenceOfMagicCOUNT. Are you sure that's what you want?

Try this instead:
  • Set EssenceOfMagicCOUNT = (EssenceOfMagicCOUNT + 1
  • If (EssenceOfMagicCOUNT Equal to 4) then do (Set EssenceOfMagicCOUNT = 1) else do (Do nothing)
Just change the position.
Of course it would help if you describe what you want to happen.
And exactly what didn't happen. Your first post was pretty vague.
 

Xialian

Member
Reaction score
8
Alright, I see I overlooked a few things (which is kinda rare haha), thanks for clearing that up! But here's the deal: The guy is supposed to deal extra damage every 3rd attack. The damage dealt should scale with his Intelligence (Spell Power), which has it's own seperate tab for that specific character, as he makes it his Int on all of his attacks. Also, the damage dealt wasn't primarily the problem, as it would still deal damage in some rare cases, it just doesn't trigger right.
 

vypur85

Hibernate
Reaction score
803
> as it would still deal damage in some rare cases, it just doesn't trigger right.
That's very likely because you did something wrong.
According to your description, the triggering is pretty straight forward.
 

Xialian

Member
Reaction score
8
It is, that's why I can't figure out, why it's not working. Can you help me out a bit?
 

vypur85

Hibernate
Reaction score
803
> that's why I can't figure out
Um. In fact, my previous long post has already pointed all the possible causes.

> it just doesn't trigger right
Your description was again pretty vague. Which was why my response was pretty general, that you did something wrong.

Try posting your most current trigger so everyone can see the progress.
As we know now, you select the Integer variable wrongly.

Other than that, I think it's definitely because the primary conditions were not met. Use and game text msg to check if the trigger was indeed triggered or not.

I may have missed out something though...
 

Xialian

Member
Reaction score
8
Alright, I fixed the problem with the damage not proc'ing, but the ability itself doesn't update. Here's the new trigger:
Trigger:
  • Essence of Magic build
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacked unit)) Equal to Player 7 (Green)
      • (Attacking unit) Equal to HyperAssassin
    • Actions
      • Set HASpellPower = (Intelligence of HyperAssassin (Include bonuses))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • EssenceOfMagicCOUNT Equal to 3
        • Then - Actions
          • Unit - Cause HyperAssassin to damage (Attacked unit), dealing ((Real(HASpellPower)) x 0.50) damage of attack type Chaos and damage type Universal
          • Set EssenceOfMagicCOUNT = 1
        • Else - Actions
          • Set EssenceOfMagicCOUNT = (EssenceOfMagicCOUNT + 1)
      • Unit - Set level of Essence of Magic for HyperAssassin to EssenceOfMagicCOUNT

The damage is working 100% correctly, being dealt every 3 hits. Now, the Essence of Magic ability (which was Attribute Bonus with no skill points, just tooltip) doesn't update as it never has, but should be doing. It has 3 levels, one for each charge of the ability. There is only one ability called EoM, so I'm pretty sure it's not because he has the wrong ability, and HyperAssassin is set at the start.

How it currently works: Stays at 1, always.
How it should work: It changes to whatever value EssenceOfMagicCOUNT is (1-3).

Any ideas on, why it doesn't update?
 

KaerfNomekop

Swim, fishies. Swim through the veil of steel.
Reaction score
613
If the ability doesn't appear update, that would mean that EssenceofMagicCOUNT either does not increase past 1, or the tooltips are actually the same for each level. Are there any other triggers that might interfere with the value of EssenceOfMagicCount? Try displaying game messages to check on the value of EssenceOfMagicCOUNT at the start, middle and end of the trigger to see if it changes anywhere it shouldn't, or doesn't change where it should. That would help to isolate the problem.
 

Xialian

Member
Reaction score
8
Since the ability triggers, EOMCOUNT does indeed increase. The tooltip for the ability is the same, but the name is different.

Level 1: Essence of Magic - [|cffffcc001 Charge|r]
Level 2: Essence of Magic - [|cffffcc002 Charges|r]
Level 3: Essence of Magic - [|cffffcc003 Charges|r]

I will try and see if it doesn't change. Will report back in a min

Report: It correctly counts to 3 and resets to 1, but the ability STILL isn't leveled along with it.
Trigger:
  • Actions
    • Unit - Set level of Essence of Magic for HyperAssassin to EssenceOfMagicCOUNT
    • Game - Display to Player Group - Player 1 (Red) for 3.00 seconds the text: (String(EssenceOfMagicCOUNT))

I have no idea
 
Last edited:

vypur85

Hibernate
Reaction score
803
Well, two things.

Make sure 'Essence of Magic' is a valid ability and is the exact ability that you used in your unit. Double check, maybe you hae 2 abilities with almost the same name.

Another thing... Once the unit attack, just order it to randomly move around. Sometimes ability leveling needs some orders to get updated.

Alternatively, try pausing the unit before and after leveling. It should work.
Trigger:
  • Test
    • Events
      • Player - Player 1 (Red) skips a cinematic sequence
    • Conditions
    • Actions
      • Unit - Pause Footman 0000 <gen>
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Attribute Bonus for Footman 0000 <gen>) Less than 4
        • Then - Actions
          • Game - Display to (All players) the text: Yes
          • Unit - Set level of Attribute Bonus for Footman 0000 <gen> to ((Level of Attribute Bonus for Footman 0000 <gen>) + 1)
        • Else - Actions
          • Game - Display to (All players) the text: Yes 2
          • Unit - Set level of Attribute Bonus for Footman 0000 <gen> to 1
      • Unit - Unpause Footman 0000 <gen>
 

Xialian

Member
Reaction score
8
There is only one ability called Essence of Magic.

Moving around seems to fix the problem, although I would still like it to update whenever he attacks... Maybe I should just use a different system.
Thanks for the help, though!
 

Xialian

Member
Reaction score
8
Because even then, it feels clunky to keep looking at the ability. Might as well put the stack numbers somewhere else after all. The more I use the character, the more I hate the fact I constantly have to look there to keep track of the stacks.
 

jonas

You can change this now in User CP.
Reaction score
67
Use orbs floating around him. (what you need is some visual feedback)
 

Xialian

Member
Reaction score
8
Probably, I just don't know how I should do that without an ability like the Blood Mage has (you can specify the amount of orbs, right?), and as I've just experienced, levels don't adjust unless you move, which is not what I want. You might move, but standing still and attacking should also provide some feedback :)
 

jonas

You can change this now in User CP.
Reaction score
67
use unclickable invulnerable units and move them in circular fashion
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top