• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Random Spawning of Multiple Items

Status
Not open for further replies.
Level 3
Joined
May 6, 2007
Messages
32
Here's the deal.

I'm currently working on a map where items spawns in random locations.
But I want a simple system to spawn these items without the need to spam
my triggers.

So. This is what I want.
Event
- Every # seconds of game time
Condition
- NONE
Action
- *Something like this* Item - Create *massive amount* Wood at random point in Playable map area.
*I also don't want the items to be clumped together*

This is what I have.

Event
- Every # seconds of game time
Condition
- NONE
Action
- Item - Create *Item* at Random point in Playable map area.
- Item - Create *Item* at Random point in Playable map area.
- Item - Create *Item* at Random point in Playable map area.
- Item - Create *Item* at Random point in Playable map area.
- Item - Create *Item* at Random point in Playable map area.
*and it repeats for 75+ times depending on the settings.*

So now you kind of got a picture of what I'm talking about.
I want to keep this clean and simple so I dont have to scroll all the way down the list of items.

So any such system out there that I couldn't find?
+REP To Helper(s)
 
Level 13
Joined
Sep 29, 2008
Messages
671
make use of "For each Integer" action

  • Multi Create
    • Events
      • Time - Every # seconds of game time
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 75, do (Actions)
        • Loop - Actions
          • Set Leak_Point = (Random point in (Playable map area))
          • Item - Create Tome of Experience at Leak_Point
          • Custom script: call RemoveLocation (udg_Leak_Point)
I set the location on a variable then destroy it to prevent leaks.
 
Level 3
Joined
May 6, 2007
Messages
32
Thanks, but...

Thanks, both of you guys for your time.
I already had done all the triggers, so yes, I created 75 item - create triggers.
But nerovesper your way seems probable. "Haven't tried"
So most Kudos to you.
Wolfhelm your map was kinda confusing for a survival map, but your other systems were interesting. :)

EDIT: How do I close this thread?
 
Status
Not open for further replies.
Top