• 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.

anyone has a clue?

Status
Not open for further replies.
Level 9
Joined
Jul 10, 2011
Messages
562
hey all :D

i have a little problem with one of my puzzles.

of the following 3 triggers the last one isnt working :

  • Mysterious Tree Puzzle Preset
    • Events
      • Time - Elapsed game time is 0.00 seconds
    • Conditions
    • Actions
      • Unit Group - Add DummyGreenLight 0452 <gen> to MTP[1]
      • Unit Group - Add DummyGreenLight 0453 <gen> to MTP[1]
      • Unit Group - Add DummyGreenLight 0454 <gen> to MTP[1]
      • -------- ----------------------------------------- --------
      • Unit Group - Add DummyGreenLight 0455 <gen> to MTP[2]
      • Unit Group - Add DummyGreenLight 0457 <gen> to MTP[2]
      • Unit Group - Add DummyGreenLight 0456 <gen> to MTP[2]
      • -------- ----------------------------------------- --------
      • Unit Group - Add DummyGreenLight 0459 <gen> to MTP[3]
      • Unit Group - Add DummyGreenLight 0460 <gen> to MTP[3]
      • Unit Group - Add DummyGreenLight 0458 <gen> to MTP[3]
      • -------- ----------------------------------------- --------
      • Set MTPPoint[0] = (Center of MTP0 <gen>)
      • Set MTPPoint[1] = (Center of MTP1 <gen>)
      • Set MTPPoint[2] = (Center of MTP2 <gen>)
      • Set MTPPoint[3] = (Center of MTP3 <gen>)
      • -------- ----------------------------------------- --------
      • Set MTPUnit[1] = No Unit
      • Set MTPUnit[2] = No Unit
      • Set MTPUnit[3] = No Unit

  • Mysterious Tree Puzzle Set
    • Events
      • Time - Elapsed game time is 1.00 seconds
      • Time - Every 240.00 seconds of game time
    • Conditions
    • Actions
      • Do Multiple ActionsFor each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set MTPUnit[(Integer A)] = (Random unit from MTP[(Integer A)])

  • Mysterious Tree Puzzle
    • Events
      • Unit - A unit comes within 50.00 of DummyGreenLight 0452 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0453 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0454 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0455 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0456 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0457 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0458 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0459 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0460 <gen>
      • Unit - A unit comes within 50.00 of DummyGreenLight 0461 <gen>
    • Conditions
    • Actions
      • Set TempPoint = (Position of (Triggering unit))
      • Set TempPoint2 = (Position of DummyGreenLight 0461 <gen>)
        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • 'IF'-Conditions
            • (Distance between TempPoint and TempPoint2) (<=) 50.00
          • 'THEN'-Actions
            • Unit - Move (Triggering unit) instantly to MTPPoint[0]
            • Custom script: call RemoveLocation(udg_TempPoint)
            • Custom script: call RemoveLocation(udg_TempPoint2)
          • 'ELSE'-Actions
            • Custom script: call RemoveLocation(udg_TempPoint2)
              • Do Multiple ActionsFor each (Integer A) from 1 to 3, do (Actions)
                • Loop - Actions
                  • Unit Group - Pick every unit in MTP[(Integer A)] and do (Actions)
                    • Loop - Actions
                      • Set TempPoint2 = (Position of (Picked unit))
                        • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                          • 'IF'-Conditions
                            • (Distance between TempPoint and TempPoint2) (<=) 50.00
                          • 'THEN'-Actions
                            • Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
                              • 'IF'-Conditions
                                • (Picked unit) (==) MTPUnit[(Integer A)]
                              • 'THEN'-Actions
                                • Unit - Move (Triggering unit) instantly to MTPPoint[(Integer A)]
                              • 'ELSE'-Actions
                                • Unit - Move (Triggering unit) instantly to MTPPoint[0]
                          • 'ELSE'-Actions
                      • Custom script: call RemoveLocation(udg_TempPoint2)
            • Custom script: call RemoveLocation(udg_TempPoint)
i cant find the problem in the trigger....no matter "in" which GreenLightDummy i run i dont get ported although the units are set correctly (debug message test).

if it would work it should do the following :
in every section of the puzzle are 3 of the GreenLightDummys and just one port you to the next section (MTPPoint[X]) the 2 others shall port you to the start (MTPPoint[0]). the GreenLightDummy 0461 <gen> is the in the final section porting you nack to the beginning to get out again.


thanks in advance

greetz clapto
 
Level 9
Joined
Jul 10, 2011
Messages
562
  • Set TempPoint2 = (Position of DummyGreenLight 0461 <gen>)
Why are you specifically setting this one?

i first check whether its this special GreenLightDummy because its (like i already said in the OP) the light in the final section porting you back to the beginning of the puzzle....theres no other way out.
 
Level 25
Joined
Jul 10, 2006
Messages
3,315
  • setup
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set tpUG[1] = (Units in Region 000 <gen>)
      • Set tpUG[2] = (Units in Region 000 Copy 2 <gen>)
      • Set tpUG[3] = (Units in Region 000 Copy <gen>)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Set tpUnit[(Integer A)] = (Random unit from tpUG[(Integer A)])
          • Floating Text - Create floating text that reads this one above tpUnit[(Integer A)] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Unit Group - Pick every unit in tpUG[(Integer A)] and do (Actions)
            • Loop - Actions
              • Trigger - Add to close <gen> the event (Unit - A unit comes within 180.00 of (Picked unit))
  • close
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: get
      • Set tempLoc1 = (Position of (Triggering unit))
      • Special Effect - Create a special effect at tempLoc1 using Abilities\Spells\Human\DispelMagic\DispelMagicTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • For each (Integer A) from 1 to 3, do (Actions)
        • Loop - Actions
          • Unit Group - Pick every unit in tpUG[(Integer A)] and do (Actions)
            • Loop - Actions
              • Set tempLoc2 = (Position of (Picked unit))
              • Set tempDistance = (Distance between tempLoc1 and tempLoc2)
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • tempDistance Less than or equal to 250.00
                • Then - Actions
                  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                    • If - Conditions
                      • (Picked unit) Equal to tpUnit[(Integer A)]
                    • Then - Actions
                      • Unit - Move (Triggering unit) instantly to ((Position of (Triggering unit)) offset by (-500.00, 0.00))
                      • Game - Display to (All players) the text: right one
                    • Else - Actions
                  • Special Effect - Create a special effect at tempLoc2 using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
                  • Special Effect - Destroy (Last created special effect)
                • Else - Actions
This works fine, just mind the leaks and such.

Small amendment: move the unit back in the Else section.
 
Level 9
Joined
Jul 10, 2011
Messages
562
thanks ruler.

got it to work....had to change the last check range to 250 to make it work Oo strange but okay.

+rep for the help

EDIT: and again i have to spread -.- that sucks ....sorry
 
Status
Not open for further replies.
Top