a chance trigger.. need help

soulmaka

New Member
Reaction score
2
i'm creating a passive ability that when I am attacking, there's a chance that the attacked unit will have a duplicate,. and there's 10%/13/%/16%/19%/23% chance to do that...

thanks in advance.. =)
 

Cheddar

This is the way it was meant to be.
Reaction score
126
Find a damage detection system and get a dummy unit to cast a modified "Wand of Illusion" on the target.
 

soulmaka

New Member
Reaction score
2
@Cheddar, why do i need a damage detection system? xD

i can use this right?


Trigger:
  • Conditions
    • (Random integer number between 1 and 100) Less than or equal to 2
3
 

hopy

Active Member
Reaction score
64
@Cheddar, why do i need a damage detection system? xD

It's not 100% needed, but people can abuse it otherwise by pressing stop when the unit is just about to attack, causing the attack to trigger the trigger, but no attack coolown. The "Unit is attacked" event triggers when a unit is about to attack, not when it hits.
 

DioD

New Member
Reaction score
57
Attack spam not issue in most maps (dota uses attack event for most applications).
 

hopy

Active Member
Reaction score
64
Attack spam not issue in most maps (dota uses attack event for most applications).

True, but it's the only real reason I could think of why it was suggested, and most people still want to prevent it in their maps, even though it's not realy needed that much in most cases.
 

Cheddar

This is the way it was meant to be.
Reaction score
126
Yeah, the damage detection system is for if you want to avoid someone bashing their "S" key and flooding the map with images.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
GUI based maps definely dont need this.

in fact they do.

@soulmaka:
if you want to make such a skill you can do so with the "unit is attacked" event as DioD says.

But if you want to make it right and proper you need to use a damage detection system.

thats not a bug, its a feature. a kinda stupid and not well planned out feature but blizzard is known to be a little inaccurate.

the problem is the "unit is attacked" event does NOT fire when a unit is hit by an attack. no, it fires when a unit is STARTING its attack. when it starts playing its attack animation you could say.
this is very bad for ranged units because the event will fire long before the projectile actually hits its target. but never the less its bad for melee units as well because you can spam the attack order, your unit will start over its attack, never finishing it, over and over without the need of a cool down or attack speed and your event will fire over and over. thats called a glitch. these are the things which are making the difference between a map and a good map.

using a damage detection system is the "only" way of doing it properly. you can use pretty good damage detection systems with GUI as well, Weeps GDD is a good example.
 

Medeam

New Member
Reaction score
3
Here is the second proper way of doing this...

Most people never think of this sadly.


(DL File Has Been Moved Down A Few Posts)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Here is the second proper way of doing this...

Most people never think of this sadly.

because:

a). thats not a proper solution. i dont believe any player would like to get a 0.55 seconds stun everytime he issues his unit to stop. (there might be some good reasons to issue the stop order when playing maps with triggered abilities)

b). thats not failsafe. instead of spamming the stop order you could spam the "hold position" order or simply spam right-click on your target. same effect.
 

DioD

New Member
Reaction score
57
you may prevent event reaction if attacks "a bit faster then unit can attack".

lets limit attack amount by 4 per second (0.25*5 == 1.25 with max bonus)

if any unit attack more then 4 times per second, or more then 2 timers per 0.25 second or some limit like this we ignore his attacks for some time (1-2 seconds).

its very very nice solution, but its harder then damage detection. (timestamps, database and other stuff)

this will effectively stop stop spam, since it will not work, also this is silent to user, it cannot notify how it works.
 

Medeam

New Member
Reaction score
3
because:

a). thats not a proper solution. i dont believe any player would like to get a 0.55 seconds stun everytime he issues his unit to stop. (there might be some good reasons to issue the stop order when playing maps with triggered abilities)

b). thats not failsafe. instead of spamming the stop order you could spam the "hold position" order or simply spam right-click on your target. same effect.


It is a proper solution if nothing is used for stop order/key while you can change the stun to 0.20 lowest possible which will stop spam and isn't too bad of a waiting time and I can't see too much of a use with the stop key since almost nobody has ever used it...

It is failsafe plus it can be made to counter hold position even though that hasn't been a issue since I never tested it yet while spam right-click will not work.... It will only work once before the target has been acquired.
So it wouldn't be much of a problem.

Edit: Edited and now will counter the H key as well real units can be counted as illusions.
 

Attachments

  • AttemptOfHelp.w3x
    18 KB · Views: 146

DioD

New Member
Reaction score
57
its very ugly solution, and it will be very boring to get punished for every stop you press, personaly i wil altqq such map instantly.

just imagine, your hero is faster and you backstrafe or chase enemy, you pressed stop to reset animation, get stun, and enemy ran away!
 

Medeam

New Member
Reaction score
3
It isn't as ugly as you think plus how can it be boring not to cheat?
If you altqq a map that has that then you would only be punishing yourself...
Why do you need to press stop to reset a animation?
Could always buff detect stun...
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
its still fails if you spam patrol or you right click the enemy, ground, enemy, ground, enemy in a fast pattern.

just screw this idea. its not going to work. and even if you manage to kill so many hardcoded ingame commands from the command list to make it fit it still isnt worth the effort since using a damage detection system is fast, clean and easy.
 

Medeam

New Member
Reaction score
3
its still fails if you spam patrol or you right click the enemy, ground, enemy, ground, enemy in a fast pattern.

just screw this idea. its not going to work. and even if you manage to kill so many hardcoded ingame commands from the command list to make it fit it still isnt worth the effort since using a damage detection system is fast, clean and easy.


You can't spam patrol or right click the enemy, plus not many people would try it.
This idea is much better and easier then a damage detection system since you don't need to classify everything.....
It is worth the effort since it is less then what your trying to advise.
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
what do you need to "classify" with a damage detection system?

and of course you can spam patrol since patroling units auto-aquire targets and try to attack. same effect as stop.

clicking the ground and the target alternately does the same effect. i tested what i said.

with a damage detection system the trigger would look like this:

Events
Unit takes Damage
Conditions
Unit got some passive ability
random integer between 0 and 100 <= XXX
Actions
spawn stuff...

now of course, you might separate physical and spell damage. but this can be done by various other effects. besides, including spell damage wouldnt make it worse then the possible glitches / drawbacks of your way.
 

Medeam

New Member
Reaction score
3
It is not the same effect as well it requires more work while making what you think is spam into more of a combat thing, oh also it is a lot slower and you can avoid it by triggering more into it or using lower turn rates.... So my way is best if this person does not want to do complex triggers requrieing to classify a lot of stuff.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top