• 🏆 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!

Exp Gain Regions

Status
Not open for further replies.
Level 1
Joined
Dec 13, 2009
Messages
3
I'm making a vampirism map. I've been trying to create the slayer exp gain area triggers but i cant seem to make it work. How do i set a region to grant heroes (slayers only) a set amount of exp or levels?

Thanks ;)
 
You can try something like this:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Regions[1] = Region 000 <gen>
    • Set Regions[2] = Region 001 <gen>
    • Set Regions[3] = Region 002 <gen>
    • Set ExpRate[1] = 30
    • Set ExpRate[2] = 70
    • Set ExpRate[3] = 190
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • For each (IntegerA) from 1 to 3, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Regions[(IntegerA)] contains Point1) Equal to True
          • Then - Actions
            • Set TempGroup = (Units within 900.00 of Point1 matching ((Matching unit) is a Hero) Equal to True) and ((Matching unit) belongs to an enemy of (Owner of (Triggering unit)) Equal to True) and ((Matching unit) is alive) Equal to True)
            • Unit Group - Pick every unit in TempGroup and do (Actions)
              • Loop - Actions
                • Hero - Add ExpRate[(IntegerA)] to (Picked unit), Show level-up graphics
            • Custom script: call DestoryGroup (udg_TempGroup)
          • Else - Actions
    • Custom script: call RemoveLocation (udg_Point1)
 
Level 1
Joined
Dec 13, 2009
Messages
3
You can try something like this:
  • Tr
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Set Regions[1] = Region 000 <gen>
    • Set Regions[2] = Region 001 <gen>
    • Set Regions[3] = Region 002 <gen>
    • Set ExpRate[1] = 30
    • Set ExpRate[2] = 70
    • Set ExpRate[3] = 190
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • For each (IntegerA) from 1 to 3, do (Actions)
      • Loop - Actions
        • If (All conditions are true) then do (Actions) else do (Actions)
          • If - Conditions
            • (Regions[(IntegerA)] contains Point1) Equal to True
          • Then - Actions
            • Set TempGroup = (Units within 900.00 of Point1 matching ((Matching unit) is a Hero) Equal to True) and ((Matching unit) belongs to an enemy of (Owner of (Triggering unit)) Equal to True) and ((Matching unit) is alive) Equal to True)
            • Unit Group - Pick every unit in TempGroup and do (Actions)
              • Loop - Actions
                • Hero - Add ExpRate[(IntegerA)] to (Picked unit), Show level-up graphics
            • Custom script: call DestoryGroup (udg_TempGroup)
          • Else - Actions
    • Custom script: call RemoveLocation (udg_Point1)

Could you clarify what variables you used, please?
 
Status
Not open for further replies.
Top