• 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.

Area Hex Causing Crash

Status
Not open for further replies.
Why?


  • Hex
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Hex
    • Actions
      • Set TempLoc194 = (Target point of ability being cast)
      • Set Hex_Group = (Units within 300.00 of TempLoc194 matching ((((Matching unit) is A structure) Equal to False) and ((((Matching unit) is A Hero) Equal to False) and ((((Matching unit) is Magic Immune) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and ((((Matching unit) is Polymorphed) Equal to False) and ((((Matching unit) is Mechanical) Equal to False) and (((Owner of (Matching Unit)) is and ally of (Owner of (Triggering Unit))) Equal to False)))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Number of units in Hex_Group) Greater than 0
        • Then - Actions
          • Unit Group - Pick every unit in Hex_Group and do (Actions)
            • Loop - Actions
              • Unit - Create 1 Dummy for (Owner of (Triggering unit)) at TempLoc194 facing Default building facing degrees
              • Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
              • Unit - Add Hex (Dummy) to (Last created unit)
              • Unit - Order (Last created unit) to Orc Shadow Hunter - Hex (Picked unit)
        • Else - Actions
      • Custom script: call RemoveLocation (udg_TempLoc194)
      • Custom script: call DestroyGroup (udg_Hex_Group)
 
Last edited:
Level 28
Joined
Sep 26, 2009
Messages
2,520
if what you posted here is the exact copy of your trigger, then in your matching unit condition you have 2 times "matching unit is mechanical equal to false".

What may cause the crash imo is this:
  • Custom script: call RemoveLocation (udg_TempLoc194)
  • Custom script: call DestroyGroup (udg_Hex_Group)
You have space between the call order and the point and group in brackets.

If so, then it should be
  • Custom script: call RemoveLocation(udg_TempLoc194)
  • Custom script: call DestroyGroup(udg_Hex_Group)
 
I'll double check interactions with other spells.

As long as you're here is there any way to tell an AI to only build a certain unit if the ability to build another unit has been disabled?
Specifically:
Unit A is normally trainable, except when anything above tier 1 is disabled. So instead I want the AI to train unit B.

Currently the trigger that disables unit A give each player a dummy unit X. The Building tab of the AI editor specifies that unit A only be trained when number of X is 0, and only trains B when the number of X is 1. For whatever reason it does not work so it tries to train unit B even when unit A is still enabled.
 
Level 37
Joined
Mar 6, 2006
Messages
9,243
There we go, the problem is that it can't detect the point because the target is a unit, so you have to track the target unit, then use position of unit instead.

Unit targeted spells do work with target point of ability being cast, like this:
  • Untitled Trigger 006
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Special Effect - Create a special effect at (Target point of ability being cast) using Abilities\Spells\xxx.mdl
 
Status
Not open for further replies.
Top