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.
[08:46 pm]
NudeRaider -- Brusilov
Brusilov shouted: Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
https://armoha.github.io/eud-book/
[2024-5-10. : 8:36 am]
Brusilov -- Hey, what happened to EUDDB? Is there a mirror for it somewhere? Need to do a little research.
[2024-5-09. : 11:31 pm]
Vrael -- :wob:
[2024-5-09. : 8:42 pm]
Ultraviolet -- :wob:
[2024-5-08. : 10:09 pm]
Ultraviolet -- let's fucking go on a madmen rage bruh
[2024-5-08. : 10:01 pm]
Vrael -- Alright fucks its time for cake and violence
[2024-5-07. : 7:47 pm]
Ultraviolet -- Yeah, I suppose there's something to that
[2024-5-06. : 5:02 am]
Oh_Man -- whereas just "press X to get 50 health back" is pretty mindless
[2024-5-06. : 5:02 am]
Oh_Man -- because it adds anotherr level of player decision-making where u dont wanna walk too far away from the medic or u lose healing value
[2024-5-06. : 5:01 am]
Oh_Man -- initially I thought it was weird why is he still using the basic pre-EUD medic healing system, but it's actually genius
Please log in to shout.


Members Online: Sylph-Of-Space, Oh_Man