Game crashes with create dummy

N582114

New Member
Reaction score
2
When I enter the region, my game crashes. My dummy unit has a default active ability of entangling roots.

Here's my code:

Trigger:
  • Killer Roots
    • Events
      • Unit - A unit enters Killer Grass <gen>
    • Conditions
    • Actions
      • Set Temp_Point = (Center of Killer Grass <gen>)
      • Unit - Create 1 DUMMY for Neutral Hostile at Temp_Point facing Default building facing degrees
      • Set Dummy = (Last created unit)
      • Unit - Order Dummy to Night Elf Keeper Of The Grove - Entangling Roots (Triggering unit)
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Unit - Add a 2.00 second Generic expiration timer to Dummy
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
You've created an infinite loop.

What's happening is, when a unit enters the region, you create a unit in the region, which in turn fires the trigger again.

And again.

And again.

Pretty much it repeats and repeats and creates so many units in such a short space of time that the game crashes.

There's lots of ways to do this and you've created just one of them :p.

Two ways to fix this would be:

1. Add a condition "Unit-type of Triggering Unit is Not equal to DUMMY"

2. Add before the creation of the unit "Trigger - Turn off (This trigger)"
and add after it: "Trigger - Turn on (This trigger)"
^^ This will stop the trigger from firing, but will not stop the actions from going off, so you will still get all your actions, minus one crash :p.

Hope that helped!
 

Shura

New Member
Reaction score
45
Well if you are sure you followed Ziggy's advice correctly, then the problem will be with the dummy. Make sure that the dummy has the ability, and is able to pay the mana cost, if there is any.
 

N582114

New Member
Reaction score
2
My dummy unit has the active spell 'Entangling Roots' and it still does nothing. The mana cost on entangling roots is 0.

What could be the problem?
 

Shura

New Member
Reaction score
45
So did you follow Ziggy's advice correctly? Maybe upload your new trigger, or upload your map to see if there's any problems with the dummy.
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
Also check the range, who the spell can target, etc...

Check the spell to ensure that your Dummy definitely has it, and to ensure that it definitely will work when targeting your unit.

I don't know the size of the region Killer Grass, but if it is big the spell may need to have a greater range to reach a unit that is entering it from the centre.

EDIT: Also, why are you using a variable for the Dummy? Do you need to use it later? If not then that variable is effectively useless and you could get by with just using "Last created unit".
 

N582114

New Member
Reaction score
2
The region is small. 800 range is enough for the dummy unit to cast the spell. The spell is allowed to use it on the custom hero units I made. The dummy cannot attack and has no movement speed.

Current code:

Trigger:
  • Killer Roots
    • Events
      • Unit - A unit enters Killer Grass <gen>
    • Conditions
      • (Unit-type of (Triggering unit)) Not equal to DUMMY
    • Actions
      • Set Temp_Point = (Center of Killer Grass <gen>)
      • Unit - Create 1 DUMMY for Neutral Hostile at Temp_Point facing Default building facing degrees
      • Unit - Order (Last created unit) to Night Elf Keeper Of The Grove - Entangling Roots (Triggering unit)
      • Custom script: call RemoveLocation (udg_Temp_Point)
      • Unit - Add a 2.00 second Generic expiration timer to Dummy


dummyinfo.jpg
entanglingroots.jpg
 

Happy

Well-Known Member
Reaction score
71
the only thing i can think of (after the solutions) is the model you changed....i had the same problem...dont know why but i created a unit with a model the game didnt like with that unit....dont know why...and the game crashed...so try changing the model to default and try it....

btw...why you changed the model?? its just a dummy casting a spell so why a model?? o_O
 

N582114

New Member
Reaction score
2
the only thing i can think of (after the solutions) is the model you changed....i had the same problem...dont know why but i created a unit with a model the game didnt like with that unit....dont know why...and the game crashed...so try changing the model to default and try it....

btw...why you changed the model?? its just a dummy casting a spell so why a model?? o_O
The model I set for the dummy is so that players do not see the unit in-game. Different models do not change what the unit can do.

Edit: I fixed the trigger by adding the ability to the dummy unit.

Trigger:
  • Unit - Add Entangling Roots Custom to (Last created unit)
 

Happy

Well-Known Member
Reaction score
71
The model I set for the dummy is so that players do not see the unit in-game. Different models do not change what the unit can do.

for this just set the model
JASS:
.mdl


then nobody can see the unit^^
 

Carnerox

The one and only.
Reaction score
84
for this just set the model
JASS:
.mdl


then nobody can see the unit^^

No, that can cause lags because its not even in world editor, give it the campaign zone thingy, its at the end of the model list.
 

Dirac

22710180
Reaction score
147
Is the entering unit a enemy of the dummy's owner? if so, entangling wont work, since it targets only "enemies"
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top