• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Item Stat Gains

Status
Not open for further replies.
Level 30
Joined
Sep 30, 2008
Messages
1,460
By default, for every intelligence point a hero has, his mana will increase by a certain amount.

I was wondering if there is a way to stop a units mana increasing with intelligence? I know you can access the constants and change it there, but this will affect all units on the map.

What I'm trying to do is stop one particular unit type from gaining any mana from inteligence points.

Any ideas? I can provide some more info if you need it :)

ty to whoever can help me!
 
Level 13
Joined
Oct 27, 2008
Messages
1,176
Set a trigger thats once a unit gets to a set amount of int
keeps the max mana amount at whatever you want the amount to be
This Should Work just change the info
  • Untitled Trigger 009
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set MANA[(Player number of (Triggering player))] = (Intelligence of (Last created unit) (Include bonuses))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MANA[(Player number of (Owner of (Triggering unit)))] Equal to 436547
        • Then - Actions
          • Unit - Set mana of (Triggering unit) to 475437.00
        • Else - Actions
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
Set a trigger thats once a unit gets to a set amount of int
keeps the max mana amount at whatever you want the amount to be
This Should Work just change the info
  • Untitled Trigger 009
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set MANA[(Player number of (Triggering player))] = (Intelligence of (Last created unit) (Include bonuses))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • MANA[(Player number of (Owner of (Triggering unit)))] Equal to 436547
        • Then - Actions
          • Unit - Set mana of (Triggering unit) to 475437.00
        • Else - Actions

oh wow xD Thats so simple, and the cool thing is, thats exactly what I need :D I feel so silly now lol

Ty for the help :)
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Well an intellegince point gives about 25 mana i think in ur map .

So when a hero type (X) levels up or takes an item of some sort or anything.

Just if he gains like 11 int points 11 int x 25 mana = Z .

Make a trigers that sets the mana of trigering unit - Z .
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
gaaagh, actually, I lie :p It would work if there was a function to set the max mana of a unit to 10 :S

At the moment, all i can do it set the current mana to 10, which basically means the unit has infinate mana xD

hmm... if worse comes to worse, I'll just have to modify my map so that all barbarian and shared class items dont contain any intelligence bonuses xD
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
Well just make a triger that alway pick all barbarians and -99999999 the mana from them this should work :)

The problem I have is that whenever I set the mana of the unit to 10, the maximum stays the same. I have also tried periodically setting the units intelligence to 0, however, the triggers don't include the item stat bonus' :S Even if I set the mana to -99999999 it wouldnt include the item stats.

Is there a way to set the maximum mana of a unit using triggers?
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
1st solution is :

Unit - Set mana of (Triggering unit) to 10 .

This is a triger that should work .

2nd solution is :

Make the barbarians in the object editor never get when they level +intel and they can't pick up int or mana related items at all :)

3rd solution is :

Like i said every 0.1 second set mana of (X) unit to mana of (X) unit -999999...

This is the best solution i know of .

4rth solution is :

Don't got any :p
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
Make new ability from Item Mana Bonus. Set values to -25, -50, -75 etc per level. The number will depend on that how much mana u gain per int point.

Then have an action like: every 0.10s pick all units of type barbarian and do set level of Mana(that spell) for picked unit to Intelligence (include bonuses) of picked unit.

So basically you would need like 100 levels on ur spell, but I guess it wouldnt be a problem.
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
1st solution is :

Unit - Set mana of (Triggering unit) to 10 .

This is a triger that should work .

2nd solution is :

Make the barbarians in the object editor never get when they level +intel and they can't pick up int or mana related items at all :)

3rd solution is :

Like i said every 0.1 second set mana of (X) unit to mana of (X) unit -999999...

This is the best solution i know of .

4rth solution is :

Don't got any :p

I had been contemplating preventing the unit from picking up int items, but thats a lot of triggers if you have over 100 items in a map :S IT also means I'll have to go through all my items and delete intelligence from all the class shared items too :S

I want to keep the maximum mana of the unit at 10, but I also want the unit to be able to spend mana. If I just set the mana to 10 every second, the unit will esentially have infinite mana which is a big no :S

Is there a way to do this using Jass? If there really is no easy solution, ill just have to make the item triggers :)
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Okay now i get it !

Well try it a diffrent way make the unit can only cast the ability 5 times and every 15 seconds the ability recovers and appears again it needs little amount of trigers and no mana so when the hero uses the ability just remove it and after 15 seconds make it appear pretty easy.

This will allow the hero to use his ability and he have only 10 X

each time he uses an abilitie make it X -1

so when it reaches 0 the hero cannot use his abilities anymore :)
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
Make new ability from Item Mana Bonus. Set values to -25, -50, -75 etc per level. The number will depend on that how much mana u gain per int point.

Then have an action like: every 0.10s pick all units of type barbarian and do set level of Mana(that spell) for picked unit to Intelligence (include bonuses) of picked unit.

So basically you would need like 100 levels on ur spell, but I guess it wouldnt be a problem.

It would involve a lot of coding, so ide probably be just as well off preventing the barbarian from picking up int items :D

Ty anyways though :) if worse comes to worse, I might just use it! :D
 
Level 30
Joined
Sep 30, 2008
Messages
1,460
well, by coding, i mean inputting a lot of numbers into one ability as I'll probably have to exceed 100 :S

EDIT: Also, another bug i just found is that even if I keep on setting the units mana, the item stat gains still increase mana regen lol, and this particular unit isnt meant to have any -_-

Im just going to do it the hard way and prevent the barbarian from obtaining intelligence items :)
 
Level 20
Joined
Oct 21, 2006
Messages
3,230
well, by coding, i mean inputting a lot of numbers into one ability as I'll probably have to exceed 100 :S
Never heard about auto fill levels?

EDIT: Also, another bug i just found is that even if I keep on setting the units mana, the item stat gains still increase mana regen lol, and this particular unit isnt meant to have any -_-
How about to use Int instead of Mana? Like Mantle of Int with -1, -2 -3 and so on.
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Does the barbarian NEED any intellegence? (Intelegence, not mana)
Cause then you can set standard mana to 10, and set intellegence gain per lvl to 0, and start intellegence to 0,,
That could work, maybe

EDIT: Check attachment,, Starting intellegence cant be set to 0, so 1 is lowest,,
This means you have to set max mana to 10 - Mana per Intellegence (which is in GamePlayer constants)
(Would be something like 9 or 8)
 

Attachments

  • Intellegence.jpg
    Intellegence.jpg
    6 KB · Views: 58
Status
Not open for further replies.
Top