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

Add/Remove {making an ability available only between 0:00 and 1:00}

Status
Not open for further replies.
Level 6
Joined
Aug 21, 2007
Messages
179
I have a one level spell called Lycan Curse

When the user learns it, it should disappear from the abilities list.
When the in game clock is between 00:00 and 1:00, the ability should come back
When the in game clock is at any other time, the ability should disappear.

I've tried it but it just doesn't seem to work. Any ideas? I have no idea how to use JASS so..
 
Level 17
Joined
Jun 28, 2008
Messages
776
Here is a solution :

First

Make an ability from the channel ability and in options don't say visible.
This will let you learn the ability and it wont show after you have learned it.

Second

use some triggers like :

  • Test
    • Events
      • Time - Every 1.00 seconds of game time
    • Conditions
      • ((In-game time of day) Greater than Your Time) and ((In-game time of day) Less than Your other time)
    • Actions
      • Unit - Your ability to (Your Unit)
And last

Do the same as above for the removal
 
Level 5
Joined
Feb 5, 2008
Messages
109
Why not use game time events?

  • Events
    • Game - The in-game time of day becomes Equal to 1.00
    • Game - The in-game time of day becomes Equal to 0.00
You can simply activate and deactivate abilities for certain players.
Just do it like this:

  • Remove Ability
    • Events
      • Game - The in-game time of day becomes Greater than or equal to 1.00
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Deactivate Your Ability for (Player((Integer A)))
  • Add Ability
    • Events
      • Game - The in-game time of day becomes Greater than or equal to 0.00
    • Conditions
      • (In-game time of day) Less than 1.00
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Player - Activate Your Ability for (Player((Integer A)))
The problem is that you can just learn an ability if it's activated for you.
So create one ability which is just for learning it. When a unit learns this ability, add the actual ability to the unit. After that, remove the first ability. You can also just deactivate the first ability for the unit when the second one is activated and vice-versa. Then the player knows that he already learned that ability also when it is actually deactivated.

With this you can use any ability and don't need the channel thing. This can also grant you a strong version of the ability during a specific time and a normal one during the rest.

Note: Your ability will also be activated/deactivated when a Moonstone is used.
 
Last edited:
Status
Not open for further replies.
Top