• 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] Cheaking if a unit gains exp

Status
Not open for further replies.
Level 11
Joined
Sep 12, 2008
Messages
657
How do i make a trigger that cheaks if units of time X gets exp, and if they do, i want every other unit of type X to get the exp, but also the unit of type Y.. is it possible? (I couldnt figure out a way to do it)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
cheaks if units of time

You mean, "check" if units of "type"? At least put a little bit of effort into communicating your problem to us. Anyways, these are all the natives that are available for manipulating hero experience.

JASS:
constant native GetPlayerHandicapXP takes player whichPlayer returns real
constant native SetPlayerHandicapXP takes player whichPlayer, real handicap returns nothing

native AddHeroXP takes unit whichHero, integer xpToAdd, boolean showEyeCandy returns nothing
native GetHeroXP takes unit whichHero returns integer
native SetHeroXP takes unit whichHero, integer newXpVal, boolean showEyeCandy returns nothing

native SuspendHeroXP takes unit whichHero, boolean flag returns nothing
native IsSuspendedXP takes unit whichHero returns boolean

There are no "experience events", your best bet may possibly be to run a timer that uses GetHeroXP and use that value to determine whether or not you should execute whatever actions you're thinking of.
 
Status
Not open for further replies.
Top