Why isn't this trigger working?

Wardonis

Cool Member
Reaction score
0
EVENT: Unit - A unit Finishes research
CONDITION: (Researched tech-type) Equal to Max mana

ACTION: Set maxmana = (Integer((((Max mana of Willy) x 0.02) + (Max mana of Willy))))
ACTION:Unit - Set mana of Willy to (Real(maxmana))



maxmana is an integer variable

all i'm trying to do is increase the max mana of the hero willy by 2% each time this research is used.
 

njb013

New Member
Reaction score
0
Nevermind, found the problem. "Set mana" is not "Set max mana"; it's "Set current mana". Let's say Willy starts with 100 mana. He does a research, and the trigger is called.

Willy: 100/100 MP
maxmana = (100 x .02) + 100 = 102
Set mana of Willy to Real(maxmana)
Willy: 102/100 MP, or just 100/100 MP.

See the problem?
 

Wardonis

Cool Member
Reaction score
0
Well, I'm assuming you have "A unit" specified as something? In my version of the editor at least, you can't just leave it as "A unit".

Second, because I'm picky, you can compact (Integer((((Max mana of Willy) x 0.02) + (Max mana of Willy)))) into (Integer((Max mana of Willy) x 1.02)

I know the action and condition work. I tested that part with a simple move action. Its the action i have up there that isn't working. Even condensed as you have i think it would behave the same
 

Wardonis

Cool Member
Reaction score
0
Thats what i believe the problem is with it myself. But i haven't found anything in there that lets me trigger change max mana of any char.

EDIT: I tried it out and this is exactly whats going on, i drained his mana and hit the upgrade button and its topping him off instead of pushing his max up like i want.

anyone know a way i could perm push a char's max mana multiple times?

If i could get the %max mana increase upgrade to work i wouldn't have to do any triggers. I know there is something in the upgrade section but i've tried using it and nothing happens. increasing armor, damage or adding abilities through it works but i can't push mana or mana regen with it like i want to.
 

njb013

New Member
Reaction score
0
If Willy is a hero, I believe you could raise the intelligence and do it that way. Of course, that would be a 25 MP increase, but that's the only thing I can think of besides using a trigger, which I haven't done before to alter maximum stats.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
If its a research then just make it increase the max mana of all units who benefit from it.
 

Wardonis

Cool Member
Reaction score
0
If its a research then just make it increase the max mana of all units who benefit from it.

i tried that, nothing happens. even though all my other upgrades are working for him. if anyone has ever made use of that upgrad i'd appreciate a quick walk through on it, it should be working and its not so i must have missed something but i've gone over it like 20 times

also i don't wanna touch intel, i have tomes that random drop that boost stats





thanks kaerf but i found that thread as well as a jass one and i had no idea what i was looking at or how to even begin implementing it.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Upgrading max mana is working perfectly fine for me.
Try to remake the upgrade.
 
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