HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Dynamically Modified Miss Chance Malfunction

12-13-2008, 04:36 AM#1
Kyrbi0
I have a trigger that checks every unit on the map every second for a specific buff (the buff is given by a casted ability). IF the picked unit has that buff, THEN they are given a hidden ability (= passive miss chance), ELSE the ability is removed from them.

This has worked in the past for me, but is messing up somehow. In that, the casting unit + nearby allies-of-the-caster are also Missing all the time.

Trigger:
Catalyst
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Set TempGroup = (Units in (Playable map area))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Catalyst ) Equal to True
Collapse Then - Actions
Unit - Add [Dummy] Catalyst - Hidden to (Picked unit)
Player - Disable [Dummy] Catalyst - Hidden for (Owner of (Picked unit))
Collapse Else - Actions
Unit - Remove [Dummy] Catalyst - Hidden from (Picked unit)
Custom script: call DestroyGroup(udg_TempGroup)

("[Dummy] Catalyst - Hidden" is the modified Spellbook ability containing the passive "Miss Chance" ability.)
12-13-2008, 05:19 AM#2
Ammorth
You destroy the group after the first unit. Move the destroy group outside of the Unit Group block and you should be fine.

As a note, its better to disable the spellbook once at map init for all players, then to call it for every unit in the map, every second.
12-13-2008, 05:30 AM#3
Captain Griffen
There is no passive chance to miss - only chance to evade.
12-13-2008, 10:27 AM#4
Toadcop
Quote:
There is no passive chance to miss - only chance to evade.
you can mod crit to deal 0 mult = 0 damage. in some way "miss"
12-13-2008, 11:48 AM#5
Captain Griffen
I suspect he's just taking Blizzard's names 'Chance to Miss' in the wrong way - it's on incoming attacks.
12-13-2008, 08:47 PM#6
Kyrbi0
Quote:
Originally Posted by Ammorth
You destroy the group after the first unit. Move the destroy group outside of the Unit Group block and you should be fine.
Ah, thanks.

Quote:
Originally Posted by Ammorth
As a note, its better to disable the spellbook once at map init for all players, then to call it for every unit in the map, every second.
Huh? I've already preloaded it at Init (create unit, add spellbook to unit, remove unit). Are you saying I should also "pre-Hide" the spellbook for all players?
Because since I only create 1 unit, it's only for 1 player, so I can't do that for everyone.

Quote:
Originally Posted by Captain Griffen
There is no passive chance to miss - only chance to evade.

I suspect he's just taking Blizzard's names 'Chance to Miss' in the wrong way - it's on incoming attacks.
Crapola, that's exactly what I was doing. Of course! It's like they built in Evasion into those abilities (Bash + Crit Strike)! Dangit!
It's still wierd that both the target and the caster/nearby units are Missing. I forgot to make the base ability not give a Miss Chance (based off of Drunken Haze), so that could be part of it...

Quote:
Originally Posted by Toadcop
you can mod crit to deal 0 mult = 0 damage. in some way "miss"
Hmm... Hey yeah, that could totally work! Of course, I'm stuck with those annoying "0"s floating above the head whenever they 'miss', but that's not too bad... Alright, hey thanks.

~~

As a note, I will be further adding ~4 more If/Then/Elses there, checking every second for different 'buff comboes'; will that be bad? (i.e. any other ways to Optimize)?
12-13-2008, 09:03 PM#7
Ammorth
Quote:
Originally Posted by Kyrbi0
Huh? I've already preloaded it at Init (create unit, add spellbook to unit, remove unit). Are you saying I should also "pre-Hide" the spellbook for all players?
Because since I only create 1 unit, it's only for 1 player, so I can't do that for everyone.

Trigger:
Collapse Events
Map Initialization
Conditions
Collapse Actions
Player - Disable [Dummy] Catalyst - Hidden for (Player 1 - Red)
Player - Disable [Dummy] Catalyst - Hidden for (Player 2 - Blue)
Player - Disable [Dummy] Catalyst - Hidden for (Player 3 - Teal)
------ ... ------
Player - Disable [Dummy] Catalyst - Hidden for (Player 12 - Brown)

As long as you don't enable the ability anywhere, it will persist for the rest of the game.

Quote:
Originally Posted by Kyrbi0
As a note, I will be further adding ~4 more If/Then/Elses there, checking every second for different 'buff comboes'; will that be bad? (i.e. any other ways to Optimize)?

Should be fine, just make sure to keep it short and sweet.
12-13-2008, 09:34 PM#8
Kyrbi0
^Oh, yeah. Of course. Thanks.
12-14-2008, 05:32 PM#9
Monstah
...you said "wierd" xP
12-15-2008, 02:54 PM#10
Kyrbi0
Huh?
12-15-2008, 04:00 PM#11
chobibo
Quote:
Originally Posted by POST#6
It's still wierd that both
I think he means you misspelled weird.
12-18-2008, 06:44 PM#12
Kyrbi0
Alright, something's up; it's still not working.

I took your advice, Toadcop, and made the "miss" ability inside the Spellbook a modified Critical Strike, set to 100% miss chance (for testing), and 0 bonus damage... O crud.

Is there a field on Critical Strike for "damage multiplier", or did I mis-read it and it said "damage bonus"?

Anyway, here's the code; can't imagine why it wouldn't work (might even be the Object Editor, as aforementioned...)

Trigger:
Catalyst
Collapse Events
Time - Every 1.00 seconds of game time
Conditions
Collapse Actions
Set TempGroup = (Units in (Playable map area))
Collapse Unit Group - Pick every unit in TempGroup and do (Actions)
Collapse Loop - Actions
Collapse If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Collapse If - Conditions
((Picked unit) has buff Catalyst ) Equal to True
Collapse Then - Actions
Unit - Add [Dummy] Catalyst - Hidden to (Picked unit)
Collapse Else - Actions
Unit - Remove [Dummy] Catalyst - Hidden from (Picked unit)
Custom script: call DestroyGroup(udg_TempGroup)
12-19-2008, 12:36 AM#13
chobibo
look at the picture dude.
Attached Images
File type: jpguntitled.JPG (43.8 KB)
12-19-2008, 03:06 AM#14
Kyrbi0
Yeah. All those are set to 0. In fact, every field (except "Chance to Critical Strike") are set to 0. <--CoTS is set to 100 for all (5) levels.

I'd like to think it isn't the Object Editor, but the trigger is just so darned simple.

(^Thanks, though)
12-19-2008, 09:11 AM#15
chobibo
Oh, I misunderstood kyrbi0, I think it shouldn't be zero but a negative value, though I'm not sure, wait I'll try it too.

EDIT: hey kyrbi0, I was right it's not supposed to be zero but a negative value, the Damage Multiplier should be set -1, the problem is it doesn't show a texttag to the attacker. It normally shows the texttag damage but when the damage multiplier is set to -1 it doesn't show any.
Attached Images
File type: jpguntitled.JPG (12.3 KB)