• 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.

[Trigger] Ability + Game time

Status
Not open for further replies.

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
Hey guys i have made this trigger but it doesn't work properly. anyone could help me with it?

  • Sun Light
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set GroupType = (Units of type Sun Light)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (In-game time of day) Greater than or equal to 18.00
          • (In-game time of day) Less than or equal to 6.00
        • Then - Actions
          • Unit Group - Pick every unit in GroupType and do (Unit - Add Sun Light to (Triggering unit))
          • Custom script: call DestroyGroup (udg_GroupType)
        • Else - Actions
          • Unit Group - Pick every unit in GroupType and do (Unit - Remove Sun Light from (Triggering unit))
          • Custom script: call DestroyGroup (udg_GroupType)
what i wanted is, when it's day, the building gain an ability, and when it's night it loses it, and like, i'd like to add to this trigger a way to darken the unit (rendering colors) :)
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
Thanks! this thread is sloved, but now i am looking towards make a trigger for editing unit's color / transparency :)
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
  • Sun Light OFF
    • Events
      • Game - The in-game time of day becomes Greater than or equal to 18.00
      • Game - The in-game time of day becomes Less than or equal to 6.00
    • Conditions
    • Actions
      • Set GroupType = (Units of type Sun Light)
      • Unit Group - Pick every unit in GroupType and do (Unit - Remove Sun Light from (Picked unit))
      • Animation - Change (Picked unit)'s vertex coloring to (10.00%, 10.00%, 100.00%) with 90.00% transparency
      • Custom script: call DestroyGroup (udg_GroupType)
i tried it, but yet it doesn't change anything
 
Level 5
Joined
Oct 17, 2006
Messages
151
Honestly you should have done your first trigger just change some things.

Your vent should be "every 1 sec"

and in your conditions:
If - Conditions
(In-game time of day) Greater than or equal to 18.00
(In-game time of day) Less than or equal to 6.00

Right now this means that the time has to be both "Greater than or equal to 18.00" and "Less than or equal to 6.00" (what ever isnt specified with condition groups is automatically part of the "and" group). Instead of doing that, in your "else actions" have another IFTHENELSE group with the condition "Less than or equal to 6.00" and then following that would be your remove sunlight thing.
 
Level 17
Joined
Jun 17, 2007
Messages
1,433
Honestly you should have done your first trigger just change some things.

Your vent should be "every 1 sec"

and in your conditions:
If - Conditions
(In-game time of day) Greater than or equal to 18.00
(In-game time of day) Less than or equal to 6.00

Right now this means that the time has to be both "Greater than or equal to 18.00" and "Less than or equal to 6.00" (what ever isnt specified with condition groups is automatically part of the "and" group). Instead of doing that, in your "else actions" have another IFTHENELSE group with the condition "Less than or equal to 6.00" and then following that would be your remove sunlight thing.
No, the way I showed him was the correct one (not to mention significantly faster).
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
No, the way I showed him was the correct one (not to mention significantly faster).

yes thanks everyone i got it sloved now, i wasn't paying attention i was missing picking units

Thanks~ Solved
 
Last edited:
Level 12
Joined
Mar 23, 2008
Messages
942
yes thanks everyone i got it sloved now, i wasn't paying attention i was leaking picking units

Thanks~ Sloved
its Solved xD

Your english can cause you some problems in the future...
Just helping you, leaking its not what you think. Memory Leaks are (short explanation) spaces in memory being used by something that is unnecessary.

May the good speed be with you. o/
 

Ham

Ham

Level 5
Joined
Jan 16, 2009
Messages
132
its Solved xD

Your english can cause you some problems in the future...
Just helping you, leaking its not what you think. Memory Leaks are (short explanation) spaces in memory being used by something that is unnecessary.

May the good speed be with you. o/

leak (lk)
v. leaked, leak·ing, leaks
v.intr.
1. To permit the escape, entry, or passage of something through a breach or flaw: rusted pipes that were beginning to leak; a boat leaking at the seams.
2. To escape or pass through a breach or flaw: helium leaking slowly from the balloon.
3. Informal To become publicly known through a breach of secrecy: The news has leaked

it's not just for memory leaks and i miss-type solved (typing fast)
 
Level 12
Joined
Mar 23, 2008
Messages
942
leak (lk)
v. leaked, leak·ing, leaks
v.intr.
1. To permit the escape, entry, or passage of something through a breach or flaw: rusted pipes that were beginning to leak; a boat leaking at the seams.
2. To escape or pass through a breach or flaw: helium leaking slowly from the balloon.
3. Informal To become publicly known through a breach of secrecy: The news has leaked

it's not just for memory leaks and i miss-type solved (typing fast)

I know leak is not only for memory leaks lol, but your phrase still wrong lol.
I'm only saying about memory leaks because that causes confusion much more often than you might think o.o
 
Level 7
Joined
Jul 20, 2008
Messages
377
Actually, a leak is when you're using memory, but have no way of accessing that memory again, so you can't free up whatever's in memory at that memory address. It's like having a locked safe, but when you throw away the key, how are you going to get at the stuff inside of the locked safe?
 
Level 16
Joined
Oct 12, 2008
Messages
1,570
Actually, a leak is when you're using memory, but have no way of accessing that memory again, so you can't free up whatever's in memory at that memory address. It's like having a locked safe, but when you throw away the key, how are you going to get at the stuff inside of the locked safe?

Omg,, never thought about it that way,,
And if you throw away the key, you have to get a new locker, and a new again,,
And once you have like 1000 lockers,, you will have to think long (lagg) to remember what locker holds the newest item :grin:
Omg im just like feeling soooo smart now :hohum:
 
Status
Not open for further replies.
Top