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

require night

Status
Not open for further replies.
Level 13
Joined
May 11, 2008
Messages
1,198
how do you make a spell require night time? like for shadowmeld it has to be used at night. do you have to trigger it with some conditions? would this be easier in gui or jass? so far i haven't found the condition that i can use.

another thing i was thinking is taking away and adding an ability at night time and day time. is that the normal way to work around it? but even with that i don't know the event to trigger it...
 
how do you make a spell require night time? like for shadowmeld it has to be used at night. do you have to trigger it with some conditions? would this be easier in gui or jass? so far i haven't found the condition that i can use.

another thing i was thinking is taking away and adding an ability at night time and day time. is that the normal way to work around it?

1: Make the abillity require a unit you call ''Night'', and remove it while its day and create it while its night.

2: Theres an event in Gui whic checks the time of day, i can't rember how to do it jass

3: Jass is always easier when you know how to do it, if you don't; its harder.

4:
  • Unit - Add Abillity / Unit - Remove Abillity
 
Level 11
Joined
Feb 16, 2009
Messages
760
Use a trigger like:
  • Events
  • Unit starts the effect of an ability
  • Conditions
  • Casted ability equal to {your ability}
  • Actions
  • If condtions
  • Time of day greater than or equal to {your minimum time}
  • Time of day lesser or equal to {your maximum time}
  • Then
  • {your actions}
  • Else
  • Display message: It must be night to use this ability
 
Level 5
Joined
Nov 12, 2007
Messages
134
The event you wanna use is Game - Time of Day.

Something like this:

  • Night
    • Events
      • Game - The in-game time of day becomes Equal to 18.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) matching ((Level of Ability (Day) for (Matching unit)) Greater than 0)) and do (Actions)
        • Loop - Actions
          • Unit - Add Ability (Night) to (Picked unit)
          • Unit - Remove Ability (Day) from (Picked unit)
  • Day
    • Events
      • Game - The in-game time of day becomes Equal to 6.00
    • Conditions
    • Actions
      • Unit Group - Pick every unit in (Units in (Entire map) matching ((Level of Ability (Night) for (Matching unit)) Greater than 0)) and do (Actions)
        • Loop - Actions
          • Unit - Add Ability (Day) to (Picked unit)
          • Unit - Remove Ability (Night) from (Picked unit)
You might need to level the abilities if they're Hero abilities.
 
Level 11
Joined
Feb 16, 2009
Messages
760
Battle_shipper, you trigger removes and adds a ability, it looks strange and give bugs liek when the the interface is full, or if it is an hero ability learn it multiple times. As soon as i have acces to world editor(Im somewhere else than my computer now) Ill make a proper trigger.
 
Level 5
Joined
Nov 12, 2007
Messages
134
Battle_shipper, you trigger removes and adds a ability, it looks strange and give bugs liek when the the interface is full, or if it is an hero ability learn it multiple times. As soon as i have acces to world editor(Im somewhere else than my computer now) Ill make a proper trigger.

How could it possibly look strange? The ability replacement is made instantly. And the interface can't be full cause its replacing one ability with another one.

Edit: tried it with Wind Walk and it works fine.
 

Attachments

  • Night Walk.w3x
    19.1 KB · Views: 75
Last edited:
Level 13
Joined
May 11, 2008
Messages
1,198
i'm not sure what you guys are talking about! i already said i can't do it that way, it's not an option because my map uses moon stones! do you know what moonstones are!?? i'm pretty sure this won't work...

as i said in the third post here your method of manually removing and adding the abilities is not going to work without properly being able to tell if it's night time and day time. going by the hour after all only works when there are no moon stones in the game.
 
Level 13
Joined
May 11, 2008
Messages
1,198
you're right...i hadn't realized that. i guess that explains how to make a daystone. you have to alter dawn and dusk so that 0:00 is day time. but that still doesn't answer how to make other abilities work like shadow meld and...hide...or like those dota abilities...it just occured to me that maybe i didn't look at hide yet. i'm pretty sure i've looked at shadowmeld...hmm...

anyway, just so you guys know, after the moonstone wears off the time goes back to where it was before you used the moonstone.

oh, whoops, i already looked at hide, hide is the command for the ability shadow meld, it's not a separate ability. well anyway it seems like the only way to solve this is with a couple algorhythms that check for not only time of day but also if a moonstone is being used. i think it'll be very complicated and not fun...maybe i should go bug some dota loving map makers who know all about night stalker abilities in dota.
 
Level 3
Joined
Apr 24, 2005
Messages
61
It's simply that Warcraft wasn't designed to work the way you want it to all the time.

Anyhow, if the time is set to 0:00 when using a moonstone there should be no problem with checking game time before adding/removing an ability or stopping a unit from casting said ability.
I'm pretty sure DotA replaces the Nightstalkers aura ability and checks for nighttime before applying his other abilities' additional effects. Would seem logical for me.
 
Level 13
Joined
May 11, 2008
Messages
1,198
well i'm not sure what you're talking about Jerrin but i tried doing something simple to the test map here by Battle_Shipper and what i did to it only kindof worked...i might be able to come up witha solution eventually...at least he did a little work on it and incidently enough used an ability i would probably use for my map. i'm already using windwalk, might as well use night walk instead lol. now if i can just get the damned moonstones to not screw it up. so far the moonstones are artificial night and with his test map they do absolutely nothing for night walk. but with the few changes i made it didn't work but he can night walk all the time because i guess it couldn't remove the ability because it was in cooldown or something like that...maybe i have to add an action that resets the ability cooldown before trying to remove it after the 30 second wait.

edit: are you saying when a unit tries casting an ability you have a trigger that stops him from casting it? that sounds like it's not efficient...especially if you want to use an aura...
 
Level 14
Joined
Nov 20, 2005
Messages
1,156
You could have the ability depend on a dummy unit called Night Time that you create/remove on the events dawn and dusk (are there events for that? Not sure; otherwise just time events, and then something for the moonstones - either hardcode them in or see if you can have a more general detection of night/day).
 
Level 13
Joined
May 11, 2008
Messages
1,198
yeah that's kinda what Battle_Shipper was doing...but he didn't account for moonstones. in his scenario he was using an upgrade instead of a unit but i'm not sure if it matters one way or the other. maybe there's a way to save the time when moonstone is used and you can then extrapolate the ...oh i got it to work with moonstones by playing around with the events...only weird thing about all of it is that you can windwalk when you're already windwalked...normally you can't do that but it's no big deal. just an oddity i guess which i can't explain.

it can be marked solved...i'll attach the new test map.
 

Attachments

  • Night Walk (Battle_Shipper and SanKakU).w3x
    20.2 KB · Views: 50
Level 13
Joined
May 11, 2008
Messages
1,198
yeah, now that you mention it, it doesn't look like he's using the upgrade...i'll see what happens if i delete it i guess. well i mean i guess he's using it but only has a requirement for the hero ability but what the heck it's not used in the triggers...oh i get it, it's just there to prevent the ability from being used. that makes sense.

wow, this is so exciting, this is going to make my moonstones a lot more fun in my map by making a lot of the chaser abilities only castable at night time. well, we'll see how it works out...at any rate i didn't want to have wind walk called wind walk but couldn't think of anything better. wind run was for runners but it was short duration ability. now i can do night run or moonlight run or something like that for a name.

no....wait a second...something is wrong...i've tested it more and there is a bug that needs to be worked out! the ability will not work if you learn it at night.

hmm...i might be able to work out the bug by adding a dummy level.

edit: ok i fixed the bug by adding another trigger. guys let me know if you find any bugs although it's likely i'll find them myself if there are any since i'm going to adapt it for my map, heh heh.
 

Attachments

  • Night Run bug fixed.w3x
    21.2 KB · Views: 39
Last edited:
Level 12
Joined
Feb 13, 2009
Messages
388
The unit decision is quite nice and elegant.
Make a "Daytime" and "Night time" units and place them at appropriate time periods. Then make your ability dependant on those units. Dark Deeds map uses this system.
 
Level 13
Joined
May 11, 2008
Messages
1,198
i don't really want to make units if i don't have to. there is no extra actions involved in requiring the upgrade however. if you really think it's the better solution, please submit your own test map for me to evaluate. or link to the dark deeds map.

edit: it does sound like the requiring unit method isn't as easy as the require upgrade method, but at the same time, it sounds like the requiring unit method will allow both abilities to be used, basically a night version and a day version. whereas the require upgrade option only allows the night ability to be used.

this sounds like it might be fun...perhaps i could make a unit use some frost attack at night and a fire attack at day.
 
Level 9
Joined
Feb 14, 2009
Messages
316
You can make the ability require a specific unit, called Night Time, add in into the game and allow it upgrade to Day Time. On the other hand, Day Time can upgrade itself into Night Time.

That's similar to the system I use in my map to switch electric devices on and off.
 
Level 13
Joined
May 11, 2008
Messages
1,198
uhm...the upgrade isn't upgrade like upgrading a town hall. all it is for is making it so that the day time spell doesn't do anything and can't do anything even though you can learn it because you can't use it without the upgrade. don't do anything with the upgrade, just make it an upgrade you never research and you only can use night time ability. that's what method he posted and what method i modified just now. i'll try the unit thing, it will probably be easy enough for me, but right now i'm learning vjass and recoding a lot of my triggers and i'm going to need to test the map for bugs a lot for a while before i can worry about making new skills. but thanks everyone for your replies because i was sure wondering about this and i learned a lot! i have the windwalk thing in my map ready to use i'm just too lazy to make the daytime usable version of the trigger right now but i'll just refer back to the thread when i get around to it.
 
Level 13
Joined
May 11, 2008
Messages
1,198
Update:
I noticed another bug, a really bad one where you waste skill points trying to learn the ability at night. I fixed it by not only adding a new ability as a dummy ability but also had to add a new trigger and on top of that I had to change the conditions for the new day time learn ability trigger. It was working out that Day Time always overwrote Night Time Version of the Ability so I eventually had to make it say equal to or greater than 6.00 AND less than 18.00. Which makes sense actually.
 

Attachments

  • Night Run fixed wasted skill points.w3x
    22.4 KB · Views: 42
Status
Not open for further replies.
Top