• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Custom exp system

Status
Not open for further replies.
Level 2
Joined
Jun 2, 2015
Messages
16
I'm working on a card System that would give bonus when collected and given to a npc.

  • Map init
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set ExpBonus = 0
      • Set GoldBonus = 0
      • Set CardCount = 9
Bringing card to the npc

  • Custom exp Init
  • Events
    • Unit - A unit comes within 256.00 of |cFF959697Jon The Card Hunter|r 0007 <gen>
  • Conditions
    • (Owner of (Triggering unit)) Equal to Player 1 (Red)
  • Actions
    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
      • If - Conditions
        • ((Triggering unit) has an item of type Claws of Attack +15) Equal to True
      • Then - Actions
        • Item - Remove (Item carried by (Triggering unit) of type Claws of Attack +15)
        • Set CardCount = (CardCount + 1)
        • Set GoldBonus = (CardCount x (5 / 100))
        • Set ExpBonus = (CardCount x (5 / 100))
        • Unit - Increase level of |cFFFF0303Card Hunter|r for |cFFF10D32Warrior|r 0002 <gen>
        • Game - Display to (All players) for 10.00 seconds the text: Congratulation You ...
      • Else - Actions
Now the Bonus Exp being applied to the creep

  • Creep dies Exp
    • Events
      • Unit - A unit owned by Neutral Hostile Dies
    • Conditions
      • (Dying unit) Not equal to (Summoned unit)
    • Actions
      • Set CreepLevel = (Level of (Dying unit))
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempGroup = (Units within 1000.00 of TempPoint matching ((((Matching unit) is A Hero) Equal to True) and (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)))
      • Set TempGroup2 = (Units within 1000.00 of TempPoint matching (((Triggering unit) is A Hero) Equal to True))
      • Unit Group - Pick every unit in TempGroup and do (Hero - Add ((CreepLevel x 2) + ((CreepLevel x 2) x ExpBonus)) experience to (Picked unit), Show level-up graphics)
After that the formula should be for a creep lvl 2
(2*2) + ((2*2) * 0.50) = 6
Yet the system only give +4 exp. is there anything wrong or maybe the editor doesn't allow value under 1?
 
Level 2
Joined
Jun 2, 2015
Messages
16
Well basically it was variable who were set to integer so 5/100 would mean 0 then since it wouldn't allow 0.5.
 
Status
Not open for further replies.
Top