I am trying to make a system to give attacks a chance to miss. I am aware that FrozenFirebat made a tutorial on this topic, but the way he implements it would make it very difficult to have small percentage shifts, such as going from 5% miss chance to 4.9% miss chance.
Before I get started into trying to set this thing up, I wanted to see if anyone else had an existing system for this already, or could help me make one that doesn't cause lag. I remember mapping in WC3 where certain trigger functions caused memory leaks, or just happened too frequently and bogged down the systems of players. If I am going to create a miss chance for every attack for every unit in my map, I would like to make sure it won't have a similar effect.
In behavior look @ damage modification. Make the chance say 0.5 and make the response something like damage fraction: 0 or damage amount -100 or max damage clamp: 0. That'll give you a 50% evasion chance.
You don't need to do anything with a trigger. Just make sure the unit has the behavior.
I just tried what you said. The behavior chance refers to something dealing with unit death. No matter what chance I use, the miss chance is either on or off. If the unit has the miss behavior, it misses every shot.
It was a good idea, but I'm not sure it's quite the answer I'm looking for.
Okay, finally found some more time to work on this. Here's what I found.
Damage response IS a behavior field, but only if you set your behavior to be a buff. I was looking under modifications.
However, damage response is all completely based on how the unit that owns the behavior reacts to incoming damage. Meaning that this would only be useful if I applied it to every unit I was trying to shoot at, and even then wouldn't be as versatile as I need it to be.
Maybe I wasn't specific enough in my original post: I am trying to make a miss chance that is variable based on the individual unit who is attacking. They can have a 5% chance to miss their target, or have that decreased to say 2.4% chance to miss their target. Therefore, this cannot be a dodge, it must be a miss, otherwise all units would go down to 2.4% chance to miss, which may not be balanced in the way I am using it.
If I can't find any other way to work this out, I can make every attack against a unit sense who the attacker is and adjust the dodge % accordingly, but that would be just as clunky as the system I started out trying to make.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
I am trying to make a system to give attacks a chance to miss. I am aware that FrozenFirebat made a tutorial on this topic, but the way he implements it would make it very difficult to have small percentage shifts, such as going from 5% miss chance to 4.9% miss chance.
Before I get started into trying to set this thing up, I wanted to see if anyone else had an existing system for this already, or could help me make one that doesn't cause lag. I remember mapping in WC3 where certain trigger functions caused memory leaks, or just happened too frequently and bogged down the systems of players. If I am going to create a miss chance for every attack for every unit in my map, I would like to make sure it won't have a similar effect.
- Zeb
For lack of a better system, I have set up my own to activate on unit attack.
I've run into a snag though, I don't know how to setup the trigger Send Actor Message.
Help?
@Zeban:
Just use a damage response behavior?
@xenrathe: Go
I'll try that if you can explain it a little more detailed for me :)
Make a behavior in the data editor that does _? Make an action in my trigger that says _?
@Zeban:
In behavior look @ damage modification. Make the chance say 0.5 and make the response something like damage fraction: 0 or damage amount -100 or max damage clamp: 0. That'll give you a 50% evasion chance.
You don't need to do anything with a trigger. Just make sure the unit has the behavior.
@xenrathe: Go
I just tried what you said. The behavior chance refers to something dealing with unit death. No matter what chance I use, the miss chance is either on or off. If the unit has the miss behavior, it misses every shot.
It was a good idea, but I'm not sure it's quite the answer I'm looking for.
@Zeban:
Then you did it wrong :O
Try searching the forums for 'evasion' or 'dodge' for a more detailed answer.
@xenrathe: Go
Okay, finally found some more time to work on this. Here's what I found.
Damage response IS a behavior field, but only if you set your behavior to be a buff. I was looking under modifications.
However, damage response is all completely based on how the unit that owns the behavior reacts to incoming damage. Meaning that this would only be useful if I applied it to every unit I was trying to shoot at, and even then wouldn't be as versatile as I need it to be.
Maybe I wasn't specific enough in my original post: I am trying to make a miss chance that is variable based on the individual unit who is attacking. They can have a 5% chance to miss their target, or have that decreased to say 2.4% chance to miss their target. Therefore, this cannot be a dodge, it must be a miss, otherwise all units would go down to 2.4% chance to miss, which may not be balanced in the way I am using it.
If I can't find any other way to work this out, I can make every attack against a unit sense who the attacker is and adjust the dodge % accordingly, but that would be just as clunky as the system I started out trying to make.