• 🏆 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!

[Spell] Dummy unit refuses to cast stun.

Level 25
Joined
Sep 26, 2009
Messages
2,378
The first thing to try when dummy unit does not cast what you want it to is to eliminate the possibly of badly configured object editor data.
That means you give your dummy the ability, place the dummy in map, remove from it locust, give it model so you can actually see and select it. Run the game, select the dummy, manually try to cast given ability - is it possible? Maybe the spell needs mana which your dummy does not have, or your dummy does not turn or turns very slowly, etc.

After that you can just create a test trigger that fires for example when you press Esc key which will just create the dummy via trigger, give it the ability and orders it to cast it on some pre-defined target. Does that work?

If both options work, then most likely the issue is somewhere in the spell pack you imported.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,543
The demo map works fine so you've probably failed to setup the rawcodes despite what you say.

Also, this spellpack is using some pretty outdated methods so keep that in mind.

1) The xe unit is what's casting the stun and other dummy related abilities. One problem I see is that it's Movement is setup incorrectly - although this wouldn't necessarily prevent it from working. It's Movement Type should be set to None and Speed Base: 0, otherwise it's targeted spells will be delayed since it will need to turn to face it's target. This makes me think that the whole xecast system has issues but maybe this is the only problem. Or maybe there's another way to get the unit to cast instantly being used here that I'm unaware of. Also, this unit has the Ghost ability instead of Locust, which seems wrong? Why wouldn't a Dummy unit use Locust? Many strange decisions from a

2) The libraries used by this spellpack could be interfering with existing libraries of the same type. I imagine importing a bunch of different spellpacks in your map will create all sorts of conflict issues, although at the same time a library is meant to prevent conflict issues so I'm not 100% certain. You probably changed the rawcodes when you copied these over to your own map since the rawcode id's were already taken.

3) This damage event design is unnecessary on later patches but it's not part of the core system so whatever:
  • UnitTakeDamage Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set VariableSet UnitsEnterMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsEnterMap and do (Actions)
        • Loop - Actions
          • Trigger - Add to UnitTakeDamage <gen> the event (Unit - (Picked unit) Takes damage)
 
Last edited:
Level 14
Joined
Jul 19, 2007
Messages
772
The first thing to try when dummy unit does not cast what you want it to is to eliminate the possibly of badly configured object editor data.
That means you give your dummy the ability, place the dummy in map, remove from it locust, give it model so you can actually see and select it. Run the game, select the dummy, manually try to cast given ability - is it possible? Maybe the spell needs mana which your dummy does not have, or your dummy does not turn or turns very slowly, etc.

After that you can just create a test trigger that fires for example when you press Esc key which will just create the dummy via trigger, give it the ability and orders it to cast it on some pre-defined target. Does that work?

If both options work, then most likely the issue is somewhere in the spell pack you imported.
I tried to give the dummy a visible model to see if the dummy unit is created and it seems like it isn't.
The demo map works fine so you've probably failed to setup the rawcodes despite what you say.

Also, this spellpack is using some pretty outdated methods so keep that in mind.

1) The xe unit is what's casting the stun and other dummy related abilities. One problem I see is that it's Movement is setup incorrectly - although this wouldn't necessarily prevent it from working. It's Movement Type should be set to None and Speed Base: 0, otherwise it's targeted spells will be delayed since it will need to turn to face it's target. This makes me think that the whole xecast system has issues but maybe this is the only problem. Also, this unit has the Ghost ability instead of Locust, which seems wrong? Why wouldn't a Dummy unit use Locust? Many strange decisions from a

2) The libraries used by this spellpack could be interfering with existing libraries of the same type. I imagine importing a bunch of different spellpacks in your map will create all sorts of conflict issues, although at the same time a library is meant to prevent conflict issues so I'm not 100% certain. You probably changed the rawcodes when you copied these over to your own map since the rawcode id's were already taken.

3) This damage event design is unnecessary on later patches but it's not part of the core system so whatever:
  • UnitTakeDamage Init
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Set VariableSet UnitsEnterMap = (Units in (Playable map area))
      • Unit Group - Pick every unit in UnitsEnterMap and do (Actions)
        • Loop - Actions
          • Trigger - Add to UnitTakeDamage <gen> the event (Unit - (Picked unit) Takes damage)
I tried to give the dummy unit a visible model to see if the dummy unit is created and it isn't! And yes I had to change it's rawcode because it was already taken but when I tried with the original rawcode, it indeed created the unit that had that rawcode but it was created for player purple but I was test playing as player red :-/ It seems like the system doesn't accept the new rawcode I gave to the dummy unit...
 
Top