| 11-05-2003, 04:48 AM | #1 |
Is there any way to convert an entered chat string into a unit-type, I.E, you type "Mortar Team" and it summons a mortar team? Aside from making a different trigger for each unit that's summonable, of course. Thanks in advance! |
| 11-06-2003, 04:21 AM | #2 |
Take a look at the options for a Unit-related trigger. I don't think there's anything that does what you want, but double-check. If there's nothing that can convert a string to a unit name, or four-letter code, then I think you're out of luck. But it sounds like fun, for whatever you were planning to use it for. |
| 11-06-2003, 07:49 AM | #3 |
actually there is a string(unit-type) conversion thingy, I'm sure you can find it on your own though, I used it once before, but let me forwarn you, you have to type without spaces in the unit name, if you want a mortar team you need to type "mortarteam" I can't remember if it checks for capslock, investigate that yourself it shouldn't be too hard. Anyway, best of luck to you. |
| 11-06-2003, 08:01 AM | #4 |
The unit type string is used to issue order to train a unit in a unit procuder building. (Like a footman in a barracks) |
| 11-06-2003, 08:59 AM | #5 |
Uhh, Dyne, I'm pretty sure that still works...cause if it doesn't then how'd I do it in my map? admittedly I did the map around a year ago and I can't remember exactly which conversion thing I used...but I'm pretty sure it was that one. |
| 11-06-2003, 12:50 PM | #6 |
It works. It is Convert (String) to (Unit-type) |
| 11-06-2003, 02:28 PM | #7 |
Better use triggers, I mean, that certain units have weird strings when converted, and custom units keep the string of the old unit |
| 11-06-2003, 02:59 PM | #8 |
To figure out exactly what each unit's string is, you could make it display that string when you select the unit, or something similar. |
| 11-06-2003, 04:36 PM | #9 |
Hmm I just implemented something similar into my microtraining map, users can create their own units when they type for example "footman 5" it will give them 5 footman etc. Didn't know about the convert string to unit-type, might have saved me a lot of work. Right now I have a huge trigger with a lot of, if string equals unitx, if sting equals unity etc actions. |
| 11-06-2003, 06:59 PM | #10 |
Hmmm, I already checked, double checked...triple checked the chat message events, it always wants me to choose a unit for it to check for. I figured out a different (not quite as powerful, but faster) way to summon stuff. Thanks for all the replies anyway! |
| 11-06-2003, 10:50 PM | #11 |
Use Create Units Facing Point Under Unit, do convert string to unit type. Whats weird is the nospaces thing. See, mortar team would be mortarteam, and arthas would be arthas. Whats strange is that the Frostmourne arthas is arthaswithfrostmourne. And orc burrow is like, trollburrow. Its very strange.. |
| 11-06-2003, 11:22 PM | #12 |
You'll notice, if you convert custom units, that it gives their four-letter code instead of their name. Looks like the "unit name" is a separate string somewhere, not just the unit's name in the WE. |
