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,463
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,463
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: 149

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,463
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,463
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.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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