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

Night Time invisibility

Status
Not open for further replies.

Em!

Em!

Model Reviewer
Level 29
Joined
Jan 9, 2004
Messages
789
Night Invisibility
Events
Game - The in-game time of day becomes Equal to 18.00
Conditions
Actions
Unit Group - Pick every unit in (Units of type Peon) and do (Actions)
Loop - Actions
Unit - Add Night Invisibility to (Picked unit)

and then the second trigger is to remove the ability when The in-game time of day becomes Equal to 6.00

I need the spell to last through the night so that trained units that missed the time frame will also become invisible *I don´t know how to do that :(*, also i know this spell will most likely leak so any ideas that might prevent that would be appreciated :cute:
 

Em!

Em!

Model Reviewer
Level 29
Joined
Jan 9, 2004
Messages
789
Conflicts with the battalion triggers, can´t use trained unit...
The battalion trigger function like thus when a captain of the battalion is trained additional units are spawned by his side.

Maybe i should have mentioned that before :s

- Gah, i just realized that with it like this its impossible to help me without viewing the map and the battalion trigger functions. veeh, i´ll have to figure this out by myself but you did give me an idea and thanks for that lol
 

Rmx

Rmx

Level 19
Joined
Aug 27, 2007
Messages
1,164
Well u can use.........

Time every 4 seconds of Game time .......

Condition - if Time of day is between ? and ? equal to true

Action - Set PeonGroup = Units of type peon

Unitgroup - pick every unit in PeonGroup and do action.
Give invis to PEON
Call DestoryGroup(udg_PeonGroup)

Done this sould help !
 
  • Like
Reactions: Em!
Level 12
Joined
Mar 26, 2005
Messages
790
Conflicts with the battalion triggers, can´t use trained unit...
The battalion trigger function like thus when a captain of the battalion is trained additional units are spawned by his side.

Maybe i should have mentioned that before :s

- Gah, i just realized that with it like this its impossible to help me without viewing the map and the battalion trigger functions. veeh, i´ll have to figure this out by myself but you did give me an idea and thanks for that lol



I still dont get where is the conflict.
 

Em!

Em!

Model Reviewer
Level 29
Joined
Jan 9, 2004
Messages
789
Ahh have to ask a probably a stupid question but where can i find con*if time of day is between*

i only found (In-game time of day) Greater than or equal to in real comparison

Edit:The additional spawned unit are not trained, there created via trigger and follow the trained unit around mimicking its exacts orders but i need them to aquire the ability aswel.
 
Level 6
Joined
Sep 5, 2007
Messages
264
Would always giving the unit the ability, and using SetPlayerAbilityAvailable() work? Just a thought.

EDIT: To do "time of day is in-between", you have to use an and with "time of day is greater than" & "time of day is less than", that's the only way I've ever found to do it.
 
  • Like
Reactions: Em!
Level 12
Joined
Mar 26, 2005
Messages
790
thats two conditions combinated of course

((In-game time of day) Greater than or equal to 18.00) or ((In-game time of day) Less than or equal to 6.00)




And for the second thing, thats not conflict.


You can give invisibility to units created via triggers also.

Depening on your triger, give there the line "Unit - Add Night Invisibility to (Last created unit)" or whatever, i would have to see the concrete trigger
 

Em!

Em!

Model Reviewer
Level 29
Joined
Jan 9, 2004
Messages
789
I apologize for my noob like behavior but triggers are just not my thing lol,

tis is what i got so far

(In-game time of day) Less than or equal to 6.00
Unit Group - Pick every unit in (Units of type Peon) and do (Actions)
Loop - Actions
Unit - Remove Night Invisibility from (Picked unit)
Custom script: Call DestoryGroup(udg_PeonGroup)

is the custom script in the correct place?
 
Level 11
Joined
Feb 16, 2009
Messages
760
These triggers SHOULD do the trick.

  • Night invisibility
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • 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
    • Actions
      • Unit Group - Pick every unit in (Units of type Peon) and do (Unit - Add Invisibility to (Picked unit))
  • Trained units
    • Events
      • Unit - A unit Finishes training a unit
    • Conditions
      • (Unit-type of (Trained unit)) Equal to Peon
    • Actions
      • Trigger - Run Night invisibility <gen> (checking conditions)
  • Night invisibility off
    • Events
      • Game - The in-game time of day becomes Equal to 6.01
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units of type Peon) and do (Unit - Remove Invisibility from (Picked unit))
 
  • Like
Reactions: Em!
Status
Not open for further replies.
Top