• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Unit not issuing order

Status
Not open for further replies.
This is not the standard case of this issue which is caused by ordering computer controlled units to use an ability.

All spells in my map worked perfectly fine even with computer controlled units getting cast orders (it works when the computer player is not set in the player properties).

And then suddenly BAM! no orders are issued. Both from computer controlled units or dummy units created for the player. None of them will issue their orders.

Fx.
I have a lightning something spell.
The triggered sfx shows on the target, but the extra effect, which a dummy unit casting a dummy spell should take care of, does not.

Any ideas?
 
Level 13
Joined
Mar 24, 2013
Messages
1,105
Does the dummy unit need mana? Is it even created? etc.

Use debug messages.

Also as above, if you added any trigs with a unit is issued an order x, maybe you forgot to filter it properly so its causing problems.
 
The story in short.

I created some systems including this battle system in other maps than the real map.
After I ensured they all worked I implemented the system into the main map.
A lot of tweaks needed to be done for the systems to work properly, but in the end they all did.

The battle system uses some dummy units and abilities, and a lot of pseudo useable ability (they can be used but just activates triggers).

Since the imported abilities had their IDs screwed up I needed to fix all triggers so they tracked the right abilities.
Same for all dummy units and their dummy abilities.
All this worked.

At one point I realized that some special abilities (call them ultimate spells), was using the wrong dummies in their triggers because of the IDs.
I changed the dummies to the correct ones along with some minor fixes. Somehow after this no orders will be issued if triggered.

I should note that the ultimate spells is not how I found the bug. Normal abilities are not issued as well.

I'll give an example of one of the order triggers which worked before. No changes has been made to the trigger at any point. The unit still has the ability, it has mana, and the order string of the ability corresponds to the issued order.

Edit:
I posted a easier to understand trigger

If the random number turns out to be 1 the units attacks normally.
If the random number turns out to be 2 or 3 nothing happens. Which had led me to the conclusion that the order is not issued.
The message IS displayed.
The IS uNextUnit[1]
ugPlayerUnits contains all player controlled units.

The spider has the ability, it has mana and the order string of the ability corresponds with the order in the trigger.

  • Ability Index 11 Spider
    • Events
    • Conditions
    • Actions
      • Set TBB_iRandomNumber = (Random integer number between 1 and 3)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • TBB_iRandomNumber Greater than or equal to 2
              • (Mana of TBB_uNextUnit[1]) Greater than or equal to 50.00
        • Then - Actions
          • Unit - Order TBB_uNextUnit[1] to Night Elf Warden - Shadow Strike (Random unit from TBB_ugPlayerUnits)
          • Game - Display to (All players) the text: Spider wants to cas...
        • Else - Actions
          • Trigger - Run Enemy Attack <gen> (checking conditions)
 
Last edited:
I'm sorry for double posting.
I just wanted to note that I found the source of the problem.

I had turned off a visibility trigger.
A unit cannot cast an ability on a unit they cannot see.
The reason why the "Trigger - Run Enemy Attack" action worked was because that trigger ordered the unit to standard move to the location of the target, which obviously can be done at a no-vision locations.

I'm friggin happy I found the source! :D
 
Status
Not open for further replies.
Top