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

How do you check if an item is in a region?

Status
Not open for further replies.
Level 5
Joined
Aug 15, 2007
Messages
145
here let me post what ive already done, but it does not work
  • RuneItems
    • Events
      • Time - Every (Random real number between 5.00 and 10.00) seconds of game time
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Execution count of (This trigger)) Equal to 1
        • Then - Actions
          • Set RuneSpawnCounter[1] = 1
          • Set RuneSpawnCounter[2] = 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Execution count of (This trigger)) Greater than or equal to 2
        • Then - Actions
          • Set RuneSpawnCounter[1] = 2
          • Set RuneSpawnCounter[2] = 2
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RuneSpawnCounter[1] Equal to 1
        • Then - Actions
          • Set RiverItemsRegions[1] = (Center of Rune Spot <gen>)
          • Item - Create RiverItems[(Random integer number between 1 and RiverItemsCount)] at RiverItemsRegions[1]
          • Set RuneLoc[1] = (Position of (Last created item))
          • Custom script: call RemoveLocation( udg_RiverItemsRegions[1])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • RuneSpawnCounter[2] Equal to 1
        • Then - Actions
          • Set RiverItemsRegions[2] = (Center of Rune Spot2 <gen>)
          • Item - Create RiverItems[(Random integer number between 1 and RiverItemsCount)] at RiverItemsRegions[2]
          • Set RuneLoc[2] = (Position of (Last created item))
          • Custom script: call RemoveLocation( udg_RiverItemsRegions[2])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Rune Spot <gen> contains RuneLoc[1]) Equal to False
          • RuneSpawnCounter[1] Equal to 2
        • Then - Actions
          • Custom script: call RemoveLocation( udg_RuneLoc[1])
          • Set RiverItemsRegions[1] = (Center of Rune Spot <gen>)
          • Item - Create RiverItems[(Random integer number between 1 and RiverItemsCount)] at RiverItemsRegions[1]
          • Set RuneLoc[1] = (Position of (Last created item))
          • Custom script: call RemoveLocation( udg_RiverItemsRegions[1])
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Rune Spot2 <gen> contains RuneLoc[2]) Equal to False
          • RuneSpawnCounter[2] Equal to 2
        • Then - Actions
          • Custom script: call RemoveLocation( udg_RuneLoc[2])
          • Set RiverItemsRegions[2] = (Center of Rune Spot2 <gen>)
          • Item - Create RiverItems[(Random integer number between 1 and RiverItemsCount)] at RiverItemsRegions[2]
          • Set RuneLoc[2] = (Position of (Last created item))
          • Custom script: call RemoveLocation( udg_RiverItemsRegions[2])
        • Else - Actions
 
Status
Not open for further replies.
Top