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

Slayers gaining xp/sec when time of day becomes 18 o'clock

Status
Not open for further replies.
Level 6
Joined
Sep 24, 2015
Messages
174
Hello,

I really dont know how to do this trigger : time of day becomes 18 o'clock , slayer(unit) in region "Slayer pool" get 20 xp per seconds...

if someone could help it would be awesome !

thanks
 
Level 10
Joined
Apr 4, 2010
Messages
509
The trigger below only works at night.
  • Night n Day
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (In-game time of day) Less than or equal to 6.00
          • (In-game time of day) Greater than or equal to 18.00
    • Actions
 
Level 6
Joined
Sep 24, 2015
Messages
174
thank you for this "start trigger" it helped me

if someone could send the "actions" it would be cool too ;)
 
Level 6
Joined
Sep 24, 2015
Messages
174
But to activated this trigger for only one type of specified hero unit? because I tried and it's not working...
 
Level 6
Joined
Sep 24, 2015
Messages
174
I did like this:

  • Slayers xp at night
    • Event
      • Temps - Every 1.00 seconds of game time
    • Conditions
      • (In-game time of day) Less or Equal to 6.00
      • (In-game time of day) Greater or Equal to 18.00
    • Actions
      • Unit group - Pick every unit in (Units in SlayerXpZone <gen>) and do (Actions)
        • Loop - Actions
          • Hero - Add 20 experience to (Picked unit), Show level-up graphics
also it's in french version :S I tried to replace the french words in Eng (translate)

sorry
 
Level 10
Joined
Apr 4, 2010
Messages
509
So the problem is the you want the exp exclusively for the "Slayers".
  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Unit-type of (Picked unit)) Equal to Slayer
    • Then - Actions
      • Hero - Add 20 experience to (Picked unit), Show level-up graphics
    • Else - Actions
or you can do it like this.
  • Unit Group - Pick every unit in (Units in (SlayerXpZone) matching ((Unit-type of (Matching unit)) Equal to Slayer)) and do (Actions)
    • Loop - Actions
 
Level 6
Joined
Sep 24, 2015
Messages
174
It's not working...

  • Slayers xp at night
    • Event
      • Temps - Every 1.00 seconds of game time
    • Conditions
      • (In-game time of day) Less or Equal to* 6.00
      • (In-game time of day) Greater or Equal to* 18.00
    • Actions
      • Unit group - Pick every unit in (Units in SlayerXpZone <gen> matching ((Unit-type of (Matching unit)) Equal to* Slayer)) and do (Actions)
        • Loop - Actions
          • Hero - Add 20 experience to (Matching unit), Show level-up graphics
 
Level 18
Joined
May 11, 2012
Messages
2,103
You use matching unit only when you are doing comparison inside the pick units in group action. Then to refer to the the units you are picking (since you are picking units in a unit group), you use (picked unit) function.
 
Level 6
Joined
Sep 24, 2015
Messages
174
it's still not working ...

  • Slayers xp at night
    • Evénements
      • Temps - Every 1.00 seconds of game time
    • Conditions
      • (In-game time of day) Inférieur ou égal Ã* 6.00
      • (In-game time of day) Supérieur ou égal Ã* 18.00
    • Actions
      • Groupe unité - Pick every unit in (Units in SlayerXpZone <gen> matching ((Unit-type of (Matching unit)) Egal Ã* Slayer)) and do (Actions)
        • Boucle - Actions
          • Héros - Add 20 experience to (Picked unit), Montrer level-up graphics
What did I wrong?
 
Level 11
Joined
Jun 2, 2013
Messages
613
I would put it in an if then else function.


  • Actions
  • If
    • And Multiple Conditions
      • Time of Day is Less than or Equal to 6.00
      • Time of Day is Greater than or equal to 18.00
  • Then
    • Unit group - Pick every unit in (Units in SlayerXpZone <gen> matching ((Unit-type of (Matching unit)) Equal to* Slayer)) and do (Actions)
    • Loop - Actions
      • Hero - Add 20 experience to (picked unit), Show level-up graphics
  • Else
    • Do Nothing
 
Level 10
Joined
Apr 4, 2010
Messages
509
You forgot the Or - Any, if you can't manage to copy this final trigger over, I can't help you.
  • Night n Day
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (In-game time of day) Less than or equal to 6.00
          • (In-game time of day) Greater than or equal to 18.00
    • Actions
      • Unit Group - Pick every unit in (Units in (SlayerXpZone) matching ((Unit-type of (Matching unit)) Equal to Slayer)) and do (Actions)
        • Loop - Actions
          • Hero - Add 20 experience to (picked unit), Show level-up graphics
 
Level 6
Joined
Sep 24, 2015
Messages
174
oh...i don't know what i have to say to that mistake xD

sorry to wasting your time and thanks :D
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
Well thats my bad :D I didnt really read the whole thing.
On the other hand! :D you can make second trigger that runs every second, but remove the conditions for time, and then enable it when the time hits 18 and disabled when it hits 6 :D
 
Level 15
Joined
Oct 29, 2012
Messages
1,474
I think of two ways.
1- Use the item ability of "Ring of Mana" that regenerates Mana , and remove "Item Ability" , configure it as 20 mana/sec or whatever, then add it to your hero using one single one-shot trigger everytime 18PM of time reaches. (Remove the icon so it won't be shown).

2- Do that by simple triggering like this :

Xp/Second
  • Mana Regenerating
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • (In-game time of day) Less than or equal to 6.00
      • (In-game time of day) Greater than or equal to 18.00
    • Actions
      • -------- You should remove all leaks for better performance. --------
      • Custom script: set bj_wantDestroyGroup = true
      • Unit Group - Pick every unit in (Units in (SlayersXpReg) matching (Unit-type of (Picked Unit) Equal to "Slayer")) and do (Actions)
        • Loop - Actions
          • Unit - Set mana of (Picked unit) to ((Mana of (Picked unit)) + 20.00)
EDIT : Ops, I seem to have mistaken here, replace the Mana trigger with an Xperience trigger. xD
 
Last edited:
Level 3
Joined
Mar 3, 2011
Messages
58
  • XP
    • Events
      • Time - Every 10.00 seconds of game time
    • Conditions
    • Actions
      • Unit Group - Pick every unit in Heroes and do (Actions)
        • Loop - Actions
          • Hero - Add 15 experience to (Picked unit), Hide level-up graphics
  • Untitled Trigger 001
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
      • ((Owner of (Triggering unit)) controller) Equal to Computer
    • Actions
      • Unit Group - Add (Triggering unit) to Heroes
Just add the conditions and instead of group, use region
 
Level 6
Joined
Sep 24, 2015
Messages
174
how to give 2% of max current xp every seconds?

I did like this but it's not working again...:goblin_boom:

Hero - Add (10 + ((Integer((Real((Hero experience of (Picked unit)))))) x (Integer(0.02)))) experience to (Picked unit), Montrer level-up graphics
 
Level 1
Joined
Jan 24, 2014
Messages
6
If you're using default XP needed formula (200/500/900... total or 200/300/400... next-level xp), then just use "(Hero Level of (Picked Unit)+1)*2", otherwise you should use your own formula.
 
Status
Not open for further replies.
Top