• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Item Spawning Trigger

Status
Not open for further replies.
Level 3
Joined
Dec 24, 2008
Messages
63
Hi there!

I need help with a item spawning trigger.

Im making a tag map and i want this item to spawn randomly in one of these 9 regions every 5 minutes that i've put out on the map that gives gold and exp, i want to limit the pick up of this item to just a specific unit so it cant be picked up from other heros etc.

I've searched on the forum but couldn't find anything about this.

Thanks, Tozza.

P.S: +Rep to the one that helps me out (;
 
Level 13
Joined
Mar 24, 2010
Messages
950
this is what you want i believe

  • Melee Initialization
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set Regions[1] = area 1 <gen>
      • Set Regions[2] = area 2 <gen>
      • Set Regions[3] = area 3 <gen>
      • //and so on..
  • every 5 mins
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Int = (Random integer number between 1 and 9)
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Int Equal to (Integer A)
            • Then - Actions
              • Set Temp_Point = (Random point in Regions[(Integer A)])
              • Item - Create Tome of Experience at Temp_Point
              • Custom script: call RemoveLocation (udg_Temp_Point)
            • Else - Actions
  • One unit gets
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Item-type of (Target item of issued order)) Equal to Tome of Experience
      • (Unit-type of (Triggering unit)) Not equal to Paladin
    • Actions
      • Unit - Order (Triggering unit) to Move To (Target item of issued order)
first sets up the regions
2nd makes the item every 5 mins
3rd only lets 1 unit type get the item
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
this is what you want i believe
  • every 5 mins
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Int = (Random integer number between 1 and 9)
      • For each (Integer A) from 1 to 9, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Temp_Int Equal to (Integer A)
            • Then - Actions
              • Set Temp_Point = (Random point in Regions[(Integer A)])
              • Item - Create Tome of Experience at Temp_Point
              • Custom script: call RemoveLocation (udg_Temp_Point)
            • Else - Actions

Why not
  • every 5 mins
    • Events
      • Time - Every 300.00 seconds of game time
    • Conditions
    • Actions
      • Set Temp_Point = (Random point in Regions[(Random integer number between 1 and 9)]
      • Item - Create Tome of Experience at Temp_Point
      • Custom script: call RemoveLocation (udg_Temp_Point)
 
Status
Not open for further replies.
Top