This code does not work, it is supposed to pick all nearby corpse and make them burst

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Trigger:
  • Expulsion Periodic
    • Events
      • Time - Every 0.75 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Group = (Units in (Playable map area) matching ((Unit-type of (Matching unit)) Equal to Expulsion Circle))
      • Unit Group - Pick every unit in Temp_Group and do (Actions)
        • Loop - Actions
          • Set Temp_Point = (Position of (Picked unit))
          • Unit - Create 1 Dummy for (Owner of (Picked unit)) at Temp_Point facing Default building facing degrees
          • Unit - Add Expulsion (Explode Corpse) to (Last created unit)
          • Unit - Set level of Expulsion (Explode Corpse) for (Last created unit) to (Level of Expulsion for Hero_Selected[(Player number of (Owner of (Picked unit)))])
          • Set Temp_Group_2 = (Units within 300.00 of Temp_Point matching ((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to False)))
          • Custom script: call RemoveLocation( udg_Temp_Point )
          • Unit Group - Pick every unit in (Random 1 units from Temp_Group_2) and do (Actions)
            • Loop - Actions
              • Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
              • Unit - Remove (Picked unit) from the game
              • Set Temp_Point = (Position of (Picked unit))
              • Special Effect - Create a special effect at Temp_Point using Effects\Corpse Explosion.mdx
              • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation( udg_Temp_Point )
      • Custom script: call DestroyGroup( udg_Temp_Group )
      • Custom script: call DestroyGroup( udg_Temp_Group_2 )


This was supposed to mimic the skill of pitlord (Dota) called "Expulsion".
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Trigger:
  • Unit Group - Pick every unit in (Random 1 units from Temp_Group_2) and do (Actions)
Leaks a unit group - Random 1 units from Temp_Group_2.

Trigger:
  • Unit - Remove (Picked unit) from the game
    • Set Temp_Point = (Position of (Picked unit))
You can't get the position of a unit that's been removed. Remove the unit after getting its point.
 

cleeezzz

The Undead Ranger.
Reaction score
268
and most likely, you're removing the dummy unit too fast, before it can cast the spell, just give the unit a 1-2 second expiration timer.
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Actually this is a code where it picks all the Expulsion Dummies and then cause all picked nearby corpses from the dummy to explode. It seems that I can't get to pick the dead units at all.

@Weep

>> Actually I made it first leak free though I changed the code to try if that was the flaw, and it seems to have changed nothing.

>> The removed unit is the corpse, and I've put the temp point declaration at the top now but still no corpse removed, even the special effects or dummy don't show up.

@cleeezzz

>> The dummy is not actually removed, there is no expiration time yet for the dummy since I would need to see the dummy perform its job.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Does Expulsion Circle have the Locust ability? If so, that would be a problem - Locust units are ignored by Units in (Playable map area). Use Units Of Type instead (or better, use a loop 1-16 with Units Owned By Player Of Type, because Units Of Type inherently leaks.)
 

FhelZone

Have a drink of a nice cold mellowberry juice!
Reaction score
103
Oh is that it? Wait I need to try it again, preparing for another Alpha release :D

EDIT: Nicely done! The code works perfectly, I didn't know that locust can't be picked that way hehe... Thanks for the help.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top