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

Bury Corpse V.1.1

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
Hello, this is my first spell\system, and it's made in GUI! It's a simple bury system, which allows you to bury, pick up and drop corpses!
Enjoy & have fun! ;)


  • Bury Corpse
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Unit-type of (Selling unit)) Equal to Corpse
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to Bury Corpse
        • Then - Actions
          • Item - Remove (Sold Item)
          • Unit - Pause (Buying unit)
          • Unit - Make (Buying unit) face (Selling unit) over 0.50 seconds
          • Animation - Play (Buying unit)'s stand channel animation
          • Wait 2.00 seconds
          • Unit - Replace (Selling unit) with a Grave using The new unit's default life and mana
          • Unit - Unpause (Buying unit)
          • Animation - Play (Buying unit)'s stand animation
        • Else - Actions
  • Pick Up Corpse
    • Events
      • Unit - A unit Sells an item (from shop)
    • Conditions
      • (Unit-type of (Selling unit)) Equal to Corpse
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Item-type of (Sold Item)) Equal to Pick Up Corpse
        • Then - Actions
          • Unit - Remove (Selling unit) from the game
          • Item - Remove (Sold Item)
          • Hero - Create Dead Corpse and give it to (Buying unit)
        • Else - Actions
  • Drop Corpse
    • Events
      • Unit - A unit Uses an item
    • Conditions
      • (Item being manipulated) Equal to (Item carried by (Hero manipulating item) of type Dead Corpse)
    • Actions
      • Item - Remove (Item being manipulated)
      • Unit - Create 1 Corpse for Neutral Passive at (Position of (Hero manipulating item)) facing (Random point in (Playable map area))
How to add this system to your map:
-Copy the triggers that are in the ''Bury'' category
-Copy the custom units, items and abilities
-You're done!

Feedback and bug reports are highly appreciated! :)

Changelog:
V.1.1:
-Added two new features
-Now works with multiplayer
-Now works for any unit with an inventory


Keywords:
Bury, Grave, Corpse, Graveyard, Crypt, Dead, Body, Sin'dorei300
Contents

Just another Warcraft III map (Map)

Reviews
12th Dec 2015 IcemanBo: Too long as NeedsFix. Rejected. 19:53, 30th Jun 2013 Magtheridon96: Spell Submission Rules Comments You have 2 location leaks in the Drop Corpse trigger. (Selling unit) can be replaced with (Triggering...

Moderator

M

Moderator

12th Dec 2015
IcemanBo: Too long as NeedsFix. Rejected.

19:53, 30th Jun 2013
Magtheridon96:

Spell Submission Rules

Comments

  • You have 2 location leaks in the Drop Corpse trigger.
  • (Selling unit) can be replaced with (Triggering unit).
  • It would be better to make the constants like the item types and the unit types in this system configurable via a trigger that runs on map initialization so users only have to refer to one trigger to configure this system properly.
  • The condition of the Drop Corpse function could be cleaned up so that you're only checking if the type of the item being manipulated is equal to a constant item type.
  • In the Bury Corpse function, you could store (Buying unit) into a variable at the top BEFORE the wait, and then set that variable again directly AFTER the wait so you can use that variable to represent the buying unit throughout the whole trigger.
  • You have an unused variable in the map.
 
Level 25
Joined
Jun 5, 2008
Messages
2,572
Saddly it doesn't follow the rules:
* Contains leaks
* Isn't MUI

Read the rules regarding these issues and consult with some tutorials.
Should be mentioned:

Waits break MUI for almost all systems, this however can be fixed in this case through simple use of local variables.

You should use variables to preset the item type and replaced units.

The unit array isn't needed at all, a unit variable however should suffice.
Seeing as this is your first submission in the spell section, i strongly advise you to read some tutorials.
 
  • You know, the ITE is unnecessary, move the condition to the main condition part of the trigger and move the actions to main actions part of the trigger then delete the ITE [ITE = If/Then/Else]
  • Also, waits are dangerous, if I buy the item in 2 second wait still running, the selling and buying unit will be overrides.
  • Also, store the buying unit in a variable.
  • Leaks :
    • Unit - Create 1 Corpse for Neutral Passive at /(Position of (Hero manipulating item))/ facing /(Random point in (Playable map area))/
    I marked the leaks with / mark before and after the function.
 
Top