• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Ability cycle idea (trigerrer help needed)

Status
Not open for further replies.
Level 1
Joined
Jun 14, 2009
Messages
4
I've stopped working on the W3 editor a long time ago (circa 2005), so I apologize if my idea has a rather simple solution. My knowledge is more than rusty by now. Two days ago, I came up with (what I think is) a neat idea to use in a map, so I decided to return to my long forgotten hobby.

I will provide illustration to this gameplay mechanic idea, a thing I call "Ability cycle". All provided names and abilities are placeholders.

Step 1: Hero X purchases the Cycling Artifact I from a shop that provides either Cycling Artifact I or Cycling Artifact II. This artifact determines the cycle of his abilities (see further).

Step 2: Our Hero X wanders around. Notice how he does not have any abilities yet. (And please imagine there's an item in his inventory.)

Step 3: Our hero right clicks on the "adversary" he just saw! The cycle immediately detects that and provides him with the first tier in his cycle of abilities.

Step 4: After ten seconds, the cycle checks if the adversary is still under attack and changes his abilities to the second tier, as predetermined by the Cycling Artifact. Notice how his previous abilities disappear. These abilities remain for another 10 seconds.

This routine continues to up to four tiers, the last of which stays until the adversary is dead or the Hero has escaped.

Note!: If Hero X moves has no target after 10 seconds (target is dead, Hero has escaped), the cycle does not change to second tier, but instead returns to "no abilities" state. If he attacks his adversary (or a new one) once again, the cycle starts back at the first tier.

I'd appreciate immensely your tips on how to complete that!!
 
Level 2
Joined
Sep 2, 2004
Messages
15
It's a strange thing, I hope I understand it.

But first, are you working with GUI or JASS? It'd make it easier for me to help you, so I don't give you a list of function names because that would be of no use to you.
 
Level 2
Joined
Sep 2, 2004
Messages
15
The hardest part of your trigger is to determine whether or not the unit is still under attack. The only way I can suggest coming up with a way to detect is by looking at something like Vile's Assistance System, which works with timer to detect how long it has been since a unit last took damage (and you can work out in-combat events with it).

For the first part though it just sounds like you can use the Event - Is Unit Attacked, then in the actions use Unit - Add Ability and add your abilities. Use the Set Unit User Data ( I think it's called Give Custom Value to Unit, or something like that) to determine what part of the cycle the unit is.

So like, if GetUnitUserData( your unit ) == 1 then remove all old abilities, and add all new abilities.
 
Status
Not open for further replies.
Top