• 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.

Max mana

Status
Not open for further replies.

Chaosy

Tutorial Reviewer
Level 40
Joined
Jun 9, 2011
Messages
13,219
Got another problem, I got it half working I think. Atm i use UnitMaxState but somehow it wont work.
  • call
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
    • Actions
      • Custom script: set u = GetTriggerUnit()
      • Custom script: set state = UNIT_STATE_MAX_MANA
      • Custom script: set newValue = 300
      • Custom script: call SetUnitMaxState(u, state, newValue)
JASS:
globals
unit u
integer newValue
unitstate state
endglobals


Hey, I know this have been asked more than once but I want to make sure that its true/false.

I want to edit the max hp/mana through triggers and I dont want to download a libary for it or use abilitys to add the bonus.
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
Nope, sorry, theres no native.

The best workaround is Nestharus's Bonus. (which is a library and uses abilities :V)

(well i refer to his because i cant remember the names of the other ones :D )
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
oh yeah, the LUA doesnt work with x64 operating systems.

do you have a x32 bit computer anywhere?
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
Im not familliar with SetUnitMaxState, but are you sure the unit's mana hadnt been already set?
 
Level 28
Joined
Jan 26, 2007
Messages
4,789
You can just use this:
  • Custom script: call SetUnitMaxState( GetTriggerUnit(), UNIT_STATE_MAX_MANA, 300 )
Instead of creating those globals and setting them (it's shorter :D).
That said, I see no reason why it could fail. I just tested it under the same (kinda) conditions and it worked for me.
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
I know its odd but I try your script just in case
edit1:nope, don't work. I will check a few things thoe
edit2: I think I found it :D
edit3: its the creation of abilitys the //! thing tells me that it couldnt extract

//! external

doesnt work anymore. you cant use it.

November 2012 News Batch
Vengeancekael & I3lackDeath & -Grendel & Magtheridon96 & Kwaliti (Resource Moderators)
Notice: All scripts that use ObjectMerger and Lua for Object Generation are currently unacceptable because of a Microsoft patch and/or Warcraft III patch that broke Lua. This is only a temporary measure.
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
So I got to add them manually? yay..

i ended up getting someone (not releasing name) to do it for me and its roughly ~230 abilities.

Doesnt JNGP have an object editor data merging function? Or is there only the one that deletes the current object editor data and replaces it?

because it would be easy to create a merger, assuming you have all of the proper .w3u's
 
Status
Not open for further replies.
Top