• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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 33
Joined
Mar 27, 2008
Messages
8,035
Here's a test map to show you it works flawlessly (using single dummy per player).
You can compare Object Editor settings in the test map with yours (especially with the Polymorph settings).
 

Attachments

  • Mass Polymorph.w3x
    14.9 KB · Views: 40
Level 25
Joined
Sep 26, 2009
Messages
2,378
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)
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
As I said before, download the test map in my previous post and please try to compare what's the difference.
If worst comes to worst, just change your base ability to Channel instead of Silence - but I bet this is not the source of the problem.
 
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,240
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