• 🏆 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!

How to make Evasion a duration buff with using Wait command

Status
Not open for further replies.
Level 2
Joined
Nov 25, 2014
Messages
16
I'm trying to browse options for making evasion a duration buff but I cant find anything else than wait command.

I'm not sure but I recall that I shouldn't do long wait commands because the game cant run the same trigger more than one at a time.
 
I'm not sure but I recall that I shouldn't do long wait commands because the game cant run the same trigger more than one at a time.
It can, however instances overwrite unless properly handled (locals or Wait-Indexing).

You can use PDD to detect when damage is taken and also check for the damage type and if the damaged unit has the buff evasion (make the base ability something that applies a buff), and give a chance for evading.
 
Level 2
Joined
Nov 25, 2014
Messages
16
If you show your triggers here, maybe we can better understand the problem. Look in my signature how to easily post triggers.:)

The problem is though, I dont know how to begin. I literally only have Action - Unit starts the effect on an ability and (Ability being cast) Equal to DummySpell.

i'm trying to follow this guide http://www.hiveworkshop.com/forums/...279/mui-spells-using-artificial-waits-223315/
I'm having the dumbs and cant realy find the location of all of the stuff Wait-Indexing wants me to do. I get stuck right at the beginning in at Set TempUnit[MaxIndex] = (Triggering Unit) on the trigger he showcased that used counters. I understand how it's supposed to work but I cant find all the stuff he wants me to.
 
Level 2
Joined
Nov 25, 2014
Messages
16
What exactly can't you find? Triggering Unit is under the "Function" bullet.

I cant find SetTempUnit, SetTempPoint, CurrentIndex, Counter and the commands related to the duration calculation.

I basically just need to do the last showcased trigger in the guide I linked but I just realy cant find the commands anywhere.

For example I'm able to make
Set MaxIndex = (MaxIndex + 1)"

but when I try to make a new variable for
Set TempUnit[MaxIndex] = (Triggering unit)
and
Set TempPoint[MaxIndex] = (Position of TempUnit[MaxIndex])"

It doesn't allow me to make a new variable integer with the [MaxIndex] on the variable name since it doesn't accept the brackets in the variable name.
So I cant find any way to do the bracketed stuff at all.
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
Those are custom variables.
(Variables can be opened by pressing a golden X button at the top of the screen or by pressing the hotkey combination "ctrl - B")

I can definately tell you that you are new to WC3 modding and suggest you to take it not too fast. Try learning the basics of how the trigger editor works and how you can combine it with the object/terrain editor.
After that, you should learn about spell-effects or simple spells like this one.

As a suggestion for this spell.
You can add an invisible ability based of evasion to the casting unit.
Then wait a ... duration. (you can use either Wait(gametime) or you can do it with timers (which are a little bit more accurate)
Timers are for you a bit too much I think and noone will notice the difference in game ;)
Then remove the ability and the buff.

@Mythic Yea I suggest him to use Wait(gametime) even though we have a kinda big discussion about how to avoid that ;)

The ability you use could be based of Berserk and set the duration to 0 (infinite) and the other effects to 0 as well to remove any unwanted effects.

For the Evasion ability. Make a spell book and add he evasion to that book.
In the map initialization (trigger), disable the spell book for every player.
When you add evasion to a unit, add this spell book instead. This will make that ability invisible.
 
Level 2
Joined
Nov 25, 2014
Messages
16
@Mythic Yea I suggest him to use Wait(gametime) even though we have a kinda big discussion about how to avoid that ;)

But if two of the same type of hero activate the spell almost at the same time, wont the other's cast override the others ending up with only one person having the buff?

Or are the side effects of triggering it with wait for less severe than I imagined?
 
Last edited:
Level 24
Joined
Aug 1, 2013
Messages
4,657
In some way, yes.

Every pointer like "Casting unit/Triggering unit/Target point of ability being cast/triggering player/etc. etc. etc." could already been overwritten by other or another instance of the same trigger and refer to another object than intended.

So instead of using Casting unit, I make a global variable "TempUnit" and make a local variable in the Evasion trigger that overwrites the global variable. (The global variable is to be able to use the local variable in GUI. The triggers as you know them.)

Another problem with waits is that they are inaccurate.
In the map I attached, I used a wait for 5,9 seconds, but the actual wait is somewhere between 5.95 - 6.1 seconds. (Noone will notice that in-game but it still exists.)
So instead of using waits, you should use timers, but they are a little too complex for you at this moment.

So you could use this example that I attached to find out what I can tell you in a long, long story.
 

Attachments

  • evasion buff.w3x
    17.4 KB · Views: 78
Level 24
Joined
Aug 1, 2013
Messages
4,657
I just went for the actual evasion spell because I don't want to force him to use any DDS at all.
Removing the Evasion shouldn't be a problem.
The only thing that this has as a bug is that if you cast this spell before the effect has been turned down, you will have your new evasion removed by the first spell.
You could disable it for the casting unit and enable it once the duration has run out (The same way Divine Shield works) but I don't know how to disable a spell but still make it visible. I know that there was a thread about this not very long ago but didn't really read it :)
 
Status
Not open for further replies.
Top