• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] Doesn't work

Status
Not open for further replies.
Level 13
Joined
Oct 25, 2009
Messages
995
It doesn't work, anyone can help me?if the rock chunks takes damages,it will drop stones.
  • Rocks
    • Events
      • Time - Every 0.50 seconds of game time
    • Conditions
    • Actions
      • Custom script: set bj_wantDestroyGroup=true
      • Unit Group - Pick every unit in (Units of type Rock Chunks) and do (Actions)
        • Loop - Actions
          • Trigger - Add to Stones Drop <gen> the event (Unit - (Picked unit) Takes damage)
  • Stones Drop
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 45
        • Then - Actions
          • Item - Create Iron Ore at (Position of (Triggering unit))
          • Item - Set charges remaining in (Last created item) to (Random integer number between 1 and 3)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 65
        • Then - Actions
          • Item - Create Steel Ore at (Position of (Triggering unit))
          • Item - Set charges remaining in (Last created item) to (Random integer number between 1 and 3)
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Random integer number between 1 and 100) Less than or equal to 85
        • Then - Actions
          • Item - Create Stone at (Position of (Triggering unit))
          • Item - Set charges remaining in (Last created item) to (Random integer number between 1 and 3)
        • Else - Actions
 
Ew, you are flooding a trigger every 0.5 seconds with a great amount of events.
Use this instead:
  • Tri
  • Events
    • Map Initialization
  • Conditions
  • Actions
    • Custom script: set bj_wantDestroyGroup = true
    • Unit Group - Pick every unit in (Units of type Rock Chunks) and do (Actions)
      • Loop - Actions
        • Unit Group - Add (Picked unit) to AlreadyCountedGroup
        • Trigger - Add to Stones Drop <gen> the event (Unit - (Picked unit) Takes damage)
  • Tr
  • Events
    • Unit - A unit enters (Playable Map Area)
  • Conditions
    • ((Triggering unit) is in AlreadyCountedGroup) Equal to False
  • Actions
    • Unit Group - Add (Triggering unit) to AlreadyCountedGroup
    • Trigger - Add to Stones Drop <gen> the event (Unit - (Triggering unit) Takes damage)
  • Stones Drop
  • Events
  • Conditions
  • Actions
    • Set Point1 = (Position of (Triggering unit))
    • If...
    • Custom script: call RemoveLocation (udg_Point1)
  • Trigger
  • Events
    • Unit - A unit dies
  • Conditions
    • ((Triggering unit) is in AlreadyCountedGroup) Equal to True
  • Actions
    • Unit Group - Remove (Triggering unit) from AlreadyCountedGroup
 
Status
Not open for further replies.
Top