• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[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