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

Would This Work As damage detect System?

Status
Not open for further replies.
Level 16
Joined
May 2, 2011
Messages
1,345
  • Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set AllUnitsGroup = (Units in (Playable map area))
      • Unit Group - Pick every unit in AllUnitsGroup and do (Actions)
        • Loop - Actions
          • Trigger - Add to Dmg Event <gen> the event (Unit - (Picked unit) Takes damage)
      • Custom script: call DestroyGroup(udg_AllUnitsGroup)
  • UnitIsSpawn
    • Events
      • Unit - A unit enters (Playable map area)
    • Conditions
    • Actions
      • Trigger - Add to Dmg Event <gen> the event (Unit - (Triggering unit) Takes damage)
  • UnitDecays
    • Events
      • Unit - A unit Decays
    • Conditions
    • Actions
      • -------- ThereISNoCustomScriptToRemoveEventFromThisTrigger??? --------
  • Dmg Event
    • Events
    • Conditions
    • Actions
      • -------- WhateverActionsYouLike --------
 
Level 39
Joined
Feb 27, 2007
Messages
5,016
It "works" but it's not good. The events relating to dead/removed units will pile up (eating memory and map performance over time) and there is no way to remove them except by destroying the trigger and re-creating that dynamically.

Don't build your own DDS, use the DDSes in the resources section. DDSes will be unnecessary in 1.31 once "Unit - A unit takes damage" is fully implemented in the game engine.
 
Status
Not open for further replies.
Top