• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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