Staredit Network > Forums > SC1 Mapping Tools > Topic: Tool to generate triggers to create a random unit
Tool to generate triggers to create a random unit
Jan 25 2022, 10:47 pm
By: Prankenstein  

Jan 25 2022, 10:47 pm Prankenstein Post #1



Maps that give random units to players are popular (and the map I'm currently creating relies on it) so I created a little tool using Javascript and decided to share it here for what it might be worth to someone. It's in a very crude state, as I created it for my specific purpose alone.

It allows the user to create and input a CSV file (created in Excel or other spreadsheet) which in turn generates the necessary trigger conditions and actions to create a random unit.

In my case, I'm randomizing 6 switches to give me one random unit out of 64 possible units. In the HTML file, I simply set the variable "x = 6", and in the CSV file, there's 64 rows which contain the unit and the number of units to be spawned.

Zip file containing the HTML file and sample CSV is attached. Just simply run the HTML file and select the CSV to see it in action.



Attachments:
random-unit-trigger-generator.zip
Hits: 1 Size: 122.13kb



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[06:44 am]
CoCo( -- anyone willing to help fix a few triggers on a new "impossible" map? Please
[06:52 pm]
lil-Inferno -- UndeadStar
UndeadStar shouted: https://www.youtube.com/watch?v=rbChzMFX0mE <= I wonder if that will attract new players to SC1&2 ?
:doubt:
[03:18 pm]
UndeadStar -- Spoiler: there are no medics in that video
[03:18 pm]
UndeadStar -- this made me remember a line in the Broodwar manual static about medics "lengthening the expected battlefield life expectancy to over nine seconds"
[2026-10-28. : 6:50 am]
UndeadStar -- https://www.youtube.com/watch?v=rbChzMFX0mE <= I wonder if that will attract new players to SC1&2 ?
[2026-10-28. : 2:28 am]
Symmetry -- ball cleavage
[2026-10-28. : 12:38 am]
Wing Zero -- Ya cleavage
[2026-10-28. : 12:02 am]
NudeRaider -- and you can guess what the small thing in the middle is :awesome:
[2026-10-28. : 12:01 am]
NudeRaider -- Fartys balls
[2026-10-27. : 11:28 pm]
Ultraviolet -- ( :farty: Y :farty: )
Please log in to shout.


Members Online: CoCo(, JODENG