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.
[07:46 am]
RIVE -- :wob:
[2024-4-22. : 6:48 pm]
Ultraviolet -- :wob:
[2024-4-21. : 1:32 pm]
Oh_Man -- I will
[2024-4-20. : 11:29 pm]
Zoan -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
You should do my Delirus map too; it's a little cocky to say but I still think it's actually just a good game lol
[2024-4-20. : 8:20 pm]
Ultraviolet -- Goons were functioning like stalkers, I think a valk was made into a banshee, all sorts of cool shit
[2024-4-20. : 8:20 pm]
Ultraviolet -- Oh wait, no I saw something else. It was more melee style, and guys were doing warpgate shit and morphing lings into banelings (Infested terran graphics)
[2024-4-20. : 8:18 pm]
Ultraviolet -- Oh_Man
Oh_Man shouted: lol SC2 in SC1: https://youtu.be/pChWu_eRQZI
oh ya I saw that when Armo posted it on Discord, pretty crazy
[2024-4-20. : 8:09 pm]
Vrael -- thats less than half of what I thought I'd need, better figure out how to open SCMDraft on windows 11
[2024-4-20. : 8:09 pm]
Vrael -- woo baby talk about a time crunch
[2024-4-20. : 8:08 pm]
Vrael -- Oh_Man
Oh_Man shouted: yeah i'm tryin to go through all the greatest hits and get the runs up on youtube so my senile ass can appreciate them more readily
so that gives me approximately 27 more years to finish tenebrous before you get to it?
Please log in to shout.


Members Online: Roy, Ultraviolet