Region problem

Asdfblah1

New Member
Reaction score
10
It seems when ran in game, this little snippet only displays the text if the unit enters and isn't moving. When they don't stop moving, the floating text is never displayed.
I believe the problem is with the 'Region contains Unit' check. Does anybody have any suggestions on a work around or should I just make a separate identical trigger for each of the regions?

Trigger:
  • Shop Enter
    • Events
      • Unit - A unit enters Region 1 <gen>
      • Unit - A unit enters Region 2 <gen>
      • Unit - A unit enters Region 3 <gen>
      • Unit - A unit enters Region 4 <gen>
      • Unit - A unit enters Region 5 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (The Regions[(Integer A)] contains (Triggering unit)) Equal to True
            • Then - Actions
              • Floating Text - Destroy Dialog_Holder[(Integer A)]
              • Floating Text - Create floating text that reads (Greetings[(Random integer number between 1 and Number_Greetings)] + (, + (Name of (Owner of (Triggering unit))))) above Z_Units[(Integer A)] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change the lifespan of (Last created floating text) to 8.00 seconds
              • Floating Text - Change (Last created floating text): Disable permanence
              • Set Dialog_Holder[(Integer A)] = (Last created floating text)
            • Else - Actions
              • Do nothing
 

emilemil1

New Member
Reaction score
20
My guess is that it would be:

Trigger:
  • (Region [(Integer A)] contains (Triggering unit)) Equal to True


Just put the 5 regions in the Region [Index] array.
 

Komaqtion

You can change this now in User CP.
Reaction score
469
Try this ;)
Trigger:
  • Shop Enter
    • Events
      • Unit - A unit enters Region 1 <gen>
      • Unit - A unit enters Region 2 <gen>
      • Unit - A unit enters Region 3 <gen>
      • Unit - A unit enters Region 4 <gen>
      • Unit - A unit enters Region 5 <gen>
    • Conditions
      • ((Triggering unit) is A Hero) Equal to True
    • Actions
      • Set Regions[1] = Region 1 <gen>
      • Set Regions[2] = Region 2 <gen>
      • Set Regions[3] = Region 3 <gen>
      • Set Regions[4] = Region 4 <gen>
      • Set Regions[5] = Region 5 <gen>
      • Set TempPoint = (Position of (Triggering unit))
      • For each (Integer A) from 1 to 5, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Regions[(Integer A)] contains TempPoint) Equal to True
            • Then - Actions
              • Floating Text - Destroy Dialog_Holder[(Integer A)]
              • Floating Text - Create floating text that reads (Greetings[(Random integer number between 1 and Number_Greetings)] + (, + (Name of (Owner of (Triggering unit))))) above Z_Units[(Integer A)] with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 0.00%), and 0.00% transparency
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 8.00 seconds
              • Set Dialog_Holder[(Integer A)] = (Last created floating text)
            • Else - Actions
      • Custom script: call RemoveLocation(udg_TempPoint)
      • Set Regions[1] = No region
      • Set Regions[2] = No region
      • Set Regions[3] = No region
      • Set Regions[4] = No region
      • Set Regions[5] = No region
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top