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

Stats in the night

Status
Not open for further replies.
Level 6
Joined
Feb 21, 2008
Messages
205
Hey again!:) I want to give a unit increased Movement speed and attack in the night. I tried something like this: "Game time equal to 18.00"--"(Name of the spell equal to Name of the spell)--"Learn Hero (Haste- wich is endurance aura with 5 range, so it only affects this hero", I noticed that I had to have a extra Spell point to learn it, so I put in a trigger that gave my hero an extra point in the middle of this trigger. But <--- This will only work if haste is already in the "What spells I can learn place". So my hole trigger is flawed. Any1 got a better trigger for this?
 
Level 12
Joined
Nov 5, 2007
Messages
730
Make a dummy aura with 4 different buffs,with same tooltips.Make 4 unit abilities(auras) and put them in 4 disabled spellbooks.Then do this.

------------------------------------------------------------
Events

-Every 1 seconds of game time.
Conditions

Game time less than 06.00
Game time more than 18.00
Actions

-Pick all units in (playable map area) and do (actions)

-If/then/else

If(Picked Unit) has buff Night buff 1
Disable training of Spellbook 1 for owner of picked unit.
Then add Spellbook 1 to picked unit.
---------------------------------------------------------------

Copy/paste the trigger four times,replacing Night buff 1 with Night buff 2,3,and 4 and spellbook 1 with 2,3 and 4.

If you want it to wear off at dawn then:
-----------------------------------------------------------------
Events

-Every 1 seconds of game time.
Conditions

Game time less than 18.00
Game time more than 6.00
Actions

-Pick all units in (playable map area) and do (actions)
-If/then/else
If(Picked Unit) has buff Night buff 1
Remove spellbook 1 from picked unit.
--------------------------------------------------------




Im using this system and it works fine.
 
Level 29
Joined
Jul 29, 2007
Messages
5,174
Making triggers that work every 1 second will just increase the work the game needs to do.
click me for a diffrent solution (read through the thread).

Suggestion: use the search button to search first... this is in the 2nd page (before a week or so >.<)


All of this is beside the fact that your (Japut3h) trigger leaks a unit group every second.
Use the "set bj_wantDestroyGroup = true" custom script.
Example:
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units in (Playable map area)) and do (Actions)
      • Loop - Actions
        • Unit - Kill (Picked unit)

This will destroy the unit group you have made with the pick, exacly after it finishes its actions.
 
Status
Not open for further replies.
Top