| 09-06-2002, 09:20 PM | #1 |
When u convert a custom unit-type to string it returns a string that holds the object not the unit, ie, its different than the unit type and name. Is there anyway to convert a custom unit-type to string CORRECTLY if the unit does not exist, so unit name wont work. Well actually i want it to work the other way, input sting, unit create unit-type of string. |
| 09-07-2002, 10:13 PM | #2 |
Guest | Can you reephrase that. Better yet, what EXACTLY are you trying to do. Maybe I can help you better if I saw the bigger picture. |
| 09-08-2002, 05:47 PM | #3 |
OK, basically, a player types in a unit-type, and a trigger runs to make that unit, but custom unit-types aren't actually the name you give them they are like cu_h01 or something i forgot the exact string, but the unit it was describing was named "Elven Mage" |
| 09-09-2002, 12:08 AM | #4 |
Guest | I'm not sure about this but... Try saving the unit type typed to a variable. Then, Compare the variable to a list of unit types. Next, Convert the typed variable to corresponding unit type in the list. Did that make sense? |
| 09-09-2002, 01:21 AM | #5 |
yes thats what i will have to do, i juts wanted to try to make a action that would not need editing whenever i made a new custom unit, one that would ALWAYS work for any unit. Currently i have to create a unit, set its name to a variable, and then remove it then run the trigger to check if the typed unit-type is == the type of the unit with name x that was created and removed. |
