HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Hero ignores your commands

03-22-2010, 03:44 AM#1
Saishy
When you use my spell Incantation, your hero ignores any input you might do until it finishes the last order.
Like, if you order the hero to move to spot X, and press the skill's hotkey, the hero will continue to move until it gets there, and ignores any of your commands til it moves there.
(The spell works, btw)
If you're attacking someone, you will keep attacking till one of you dies.

Collapse JASS:
scope Incantation initializer Init_Incantation

function Incantation_Conditions takes nothing returns boolean
    return (GetSpellAbilityId() == 'A05R' )
endfunction

function Incantation_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    call UnitAddAbility(u, 'A04H')
    call UnitAddAbility(u, 'A05S')
    call UnitRemoveAbility(u, 'A05R')
    call SetPlayerAbilityAvailable(GetOwningPlayer(u), 'A04H', false)
    set u = null
endfunction

//===========================================================================
function Init_Incantation takes nothing returns nothing
    local trigger trg_Incantation = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trg_Incantation, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trg_Incantation, Condition( function Incantation_Conditions ) )
    call TriggerAddAction( trg_Incantation, function Incantation_Actions )
    set trg_Incantation = null
endfunction

endscope

Collapse JASS:
scope IncantationOff initializer Init_Incantation_Off

function Incantation_Conditions_Off takes nothing returns boolean
    return (GetSpellAbilityId() == 'A05S' )
endfunction

function Incantation_Actions_Off takes nothing returns nothing
    local unit u = GetTriggerUnit()
    call UnitRemoveAbility(u, 'A04H')
    call UnitRemoveAbility(u, 'A05S')
    call UnitAddAbility(u, 'A05R')
    set u = null
endfunction

//===========================================================================
function Init_Incantation_Off takes nothing returns nothing
    local trigger trg_Incantation_Off = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( trg_Incantation_Off, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( trg_Incantation_Off, Condition( function Incantation_Conditions_Off ) )
    call TriggerAddAction( trg_Incantation_Off, function Incantation_Actions_Off)
    set trg_Incantation_Off = null
endfunction

endscope

Wonder why D:
03-22-2010, 04:19 AM#2
DioD
post map, this obviously ability related.
03-22-2010, 08:02 PM#3
Saishy
There is.

It's the Kuchiki Rukia hero, Incantation ability.
Thanks.
Attached Files
File type: w3xAnime Brawl.w3x (3.0 MB)
03-22-2010, 08:12 PM#4
TheKid
First of all, there are two abilities named Incantation. Second of all, its located in the Bleach Rukia folder. In fact I couldn't find anything in the map named Kuchiki Rukia.

Please, when you're making a map that is based off of random anime names please try and be accurate when others are trying to help you. I'm looking through the map now.

I also don't know what these values 'A04H' (and the others) refer to and there's no way I'm looking through all your custom data to try and find the one of which its raw-code matches this.

This map script is so difficult to follow.
03-22-2010, 09:29 PM#5
Troll-Brain
I haven't downloaded map, but it seems it's the same kind of bug when you remove a construction, when an hidden worker was building it (all race except human and undead).
But it was also totally invulnerable.

At the very first seconds i thought that i could use it as a fashion way to make shift orders, but it isn't reliable.
03-22-2010, 09:45 PM#6
akolyt0r
I encountered this bug once in a dota match (my hero was stunned while performing an order, after the stun weard off my hero became uncontrolable and chased an enemy hero all the way back to the enemy base until my hero finally died).

Back then it was somehow related to PauseUnit/Stun, but as your ability doesnt seem to use PauseUnit that was probably wrong.

On which abilities are those abilties in your trigger based on ?
03-22-2010, 11:55 PM#7
Kueken
I am guessing it is based on metamorph, and you remove the skill when it is casted, which causes this control-loss bug. Try not to remove the metamorph skill.
03-23-2010, 12:54 AM#8
Ammorth
Beserk abilities to add and remove a disabled spellbook which has an engineering upgrade inside it.
03-23-2010, 02:21 AM#9
TheKid
Sounds like trouble, eh?
03-23-2010, 03:46 AM#10
Saishy
Quote:
Originally Posted by Ammorth
Beserk abilities to add and remove a disabled spellbook which has an engineering upgrade inside it.
So, I can't do that, right?

t.t


@Thekid, the rawcode refers to the ability named incantation (Ctrl + f)
Also you can find the trigger in the same way (ctrl + f), it's named incantation too...
03-23-2010, 05:12 AM#11
TheKid
Yes I found them both. I'm still trying to figure out whats going on though. I've never experienced a problem where my unit was not controllable yet acted normally in every other way.

I was only saying it sounds like trouble because both Spellbook and Engineering Upgrade are abilities that let you seriously trifle with user interface.
03-23-2010, 05:51 AM#12
Krysho
When the unit is ignoring orders like that, you can still use the stop command to cancel the "locked" order (at least in this case, and several other cases I have noted).

Also, change your spell effect event for both triggers involving Incantation to EVENT_PLAYER_UNIT_SPELL_ENDCAST.

Just a hunch I have from problems I once had with Chaos.
03-23-2010, 10:26 AM#13
Saishy
Quote:
Originally Posted by Ammorth
Beserk abilities to add and remove a disabled spellbook which has an engineering upgrade inside it.
This is what is happening.
03-23-2010, 05:27 PM#14
Ammorth
Try adding the engineering upgrade outside of the spellbook. Also, try and change your beserk ability to another ability (I suggest windwalk). If neither of these solve the problem, you may want to look at using a spell that interupts the current order (although they loose their current order, you shouldn't have this issue).
03-23-2010, 10:17 PM#15
Saishy
I tried letting the upgrade outside the spellbook, I tried changing the ability to windwalk.
But I still have the queue order issue D: