Rise of the Dead

tommerbob

Minecraft. :D
Reaction score
110
Trigger:
  • Events
    • Unit - A unit dies
    • Conditions
      • (Dying unit) equal to <Unit A>
    • Actions
      • Set TempPoint = (position of (Dying unit))
      • Create 1 <Unit B> at TempPoint for (owner of (Dying unit)) facing default degrees
      • custom script: call RemoveLocation(udg_TempPoint)
 

smileyguyx

Member
Reaction score
1
Trigger:
  • Events
    • Unit - A unit dies
    • Conditions
      • (Dying unit) equal to <Unit A>
    • Actions
      • Set TempPoint = (position of (Dying unit))
      • Create 1 <Unit B> at TempPoint for (owner of (Dying unit)) facing default degrees
      • custom script: call RemoveLocation(udg_TempPoint)

What's "Unit A" and "unit b" meant to be put in as? Unit variables?
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
in this exampl "unit a" would be a unit variable, however you can change it to be a unit-type variable as well if you dont want it to work for a specific unit but for all units of a type.

"unit b" however got to be a unit-type variable, though you can get the unit-type out of a unit if you like.

so in this example "unit a" is a unit, "unit b" is a unit-type though you can basically use both for both.
 

BAkil

New Member
Reaction score
9
Rotten was right when he said there was a way to do it without setting a variable:

Trigger:
  • Replace02
    • Events
      • Unit - A unit Dies
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Footman
    • Actions
      • Unit - Replace (Triggering unit) with a Knight using The new unit's default life and mana


Unit A is specified in the condition, and in this example is the Footman. You should change the Footman to which ever unit you want to be Unit A, the one that dies and then is replaced.

The only action immediately replaces the triggering unit (the unit that died) with Unit B, which in the example is a Knight. Similar to the Footman, you are to change the Knight into which ever unit you want to be Unit B.

Some people may think this doesn't work, because a dead unit cannot be replaced. I have tested this and it works fine, so long as you make sure to include that you replace the unit with "The new unit's default life and mana" or "The new unit's max life and mana", then it should be fine.
 

Accname

2D-Graphics enthusiast
Reaction score
1,464
wouldnt the corpse vanish if replaced? what if he wants to keep it?
 

BAkil

New Member
Reaction score
9
wouldnt the corpse vanish if replaced? what if he wants to keep it?

I wouldn't know if he wanted to since he didn't say anything about it.
If you do want to keep the corpse there, then use tommerbob's example above.
 
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