• 💀 Happy Halloween! 💀 It's time to vote for the best terrain! Check out the entries to Hive's HD Terrain Contest #2 - Vampire Folklore.❗️Poll closes on November 14, 2023. 🔗Click here to cast your vote!
  • 🏆 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!
  • 🏆 HD Level Design Contest #1 is OPEN! Contestants must create a maze with at least one entry point, and at least one exit point. The map should be made in HD mode, and should not be openable in SD. Only custom models from Hive's HD model and texture sections are allowed. The only exceptions are DNC models and omnilights. This is mainly a visual and design oriented contest, not technical. The UI and video walkthrough rules are there to give everyone an equal shot at victory by standardizing how viewers see the terrain. 🔗Click here to enter!

[Trigger] Something for escaping map WON'T WORK! HELP

Status
Not open for further replies.
Level 3
Joined
Feb 14, 2011
Messages
43
Here's my trigger, sorry because im new here and new to this thing..
i am trying to make an escape map..
can help.. it won't work ><
+rep +rep

  • killer terrain
    • Events
      • Time - Every 0.12 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units of type Paladin)
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set tempPoint = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • Or - Any (Conditions) are true
                • Conditions
              • (Terrain type at (Position of (Picked unit))) Equal to Cityscape - Round Tiles
              • (Terrain type at (Position of (Picked unit))) Equal to Cityscape - Grass Trim
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_tempPoint)
              • Custom script: call DestroyGroup(udg_tempGroup)
and this,

  • slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set temp_Group = (Units of type Paladin)
      • Unit Group - Pick every unit in temp_Group and do (Actions)
        • Loop - Actions
          • Set temp_Point = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is alive) Equal to True
              • (Terrain type at temp_Point) Equal to Northrend - Ice
            • Then - Actions
              • Unit - Move (Picked unit) instantly to (temp_Point offset by 11.00 towards (Facing of (Picked unit)) degrees)
            • Else - Actions
              • Custom script: call RemoveLocation(udg_temp_Point)
              • Custom script: call DestroyGroup(udg_temp_Group)
 
Last edited:

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,156
Trigger 1 leaks a lot of locations. Make sure the terrain types used to compare are from the correct tileset as grass from one tileset is value wise different from grass from another.

Trigger 2 uses variables inconsistantly.
Set temp_Group = (Units of type Paladin)
Unit Group - Pick every unit in tempGroup and do (Actions)
Notice that both names are different, a error I believe.

((Triggering unit) is alive) Equal to True
For a perodic event, there is no such thing as Triggering unit. Again another error that can cause the system to not work.
 

Bannar

Code Reviewer
Level 26
Joined
Mar 19, 2008
Messages
3,140
Your second trigger leaks location, and custom script cant be in Else - Action, because in some cases leaks wont be removed. Also, they should be placed just after actions in which they are used. Like this:

  • slide
    • Events
      • Time - Every 0.04 seconds of game time
    • Conditions
    • Actions
      • Set temp_Group = (Units of type Paladin)
      • Unit Group - Pick every unit in temp_Group and do (Actions)
        • Loop - Actions
          • Set temp_Point = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Triggering unit) is alive) Equal to True
              • (Terrain type at temp_Point) Equal to Northrend - Ice
            • Then - Actions
              • Set temp_point2 = (temp_point) offset by 11 towards (Facing of (Picked unit)) degress)
              • Unit - Move (Picked unit) instantly to temp_Point2
              • Custom script: call RemoveLocation(udg_temp_Point2)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_temp_Point)
      • Custom script: call DestroyGroup(udg_temp_Group)
EDIT: I see your first trigger has wrong placed custom scripts too.. Should be:
  • killer terrain
    • Events
      • Time - Every 0.12 seconds of game time
    • Conditions
    • Actions
      • Set tempGroup = (Units of type Paladin)
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set tempPoint = (Position of (Picked unit))
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • ((Picked unit) is alive) Equal to True
              • Or - Any (Conditions) are true
                • Conditions
              • (Terrain type at (Position of (Picked unit))) Equal to Cityscape - Round Tiles
              • (Terrain type at (Position of (Picked unit))) Equal to Cityscape - Grass Trim
            • Then - Actions
              • Unit - Kill (Picked unit)
            • Else - Actions
          • Custom script: call RemoveLocation(udg_tempPoint)
      • Custom script: call DestroyGroup(udg_tempGroup)
 
Status
Not open for further replies.
Top