| 11-11-2003, 10:05 AM | #1 |
is there any way to create ramdom pre-defined floating texts? lilke every time that i take a item. a floating text will apear over the enemy unit but it will say random words of a pre-defined list of words. any way to do it? |
| 11-11-2003, 10:47 AM | #2 |
Yeah, first make a string variable, then make it an array. Then set each number in the array to a different one of the random strings you want to appear. So like: Mystring[1] = DIE DIE DIE!!! Mystring[2] = Oops, lost my head... Mystring[3] = Where am I? Then make the floating text show the variable, and where it asks for the index number of the array, put "Random integer between 1 and #" where # is the last one in your array. And wallah, random floating text. So for my example it would look like "Mystring[random integer from 1 to 3]" and it would randomly show one of my 3 messages. |
| 11-11-2003, 11:14 AM | #3 |
THANKS!!! hey one more question. do u know how to set the alpha channel to black in a custom skin???? :P and thanks for the help with the random stuff.. :D |
| 11-11-2003, 11:20 AM | #4 |
Glad I could be of assistance with the random text. I would like to be of assistance with your skin, but unfortunatly I do not know much about skinning, sorry. |
| 11-11-2003, 11:24 AM | #5 |
well thanks :D ... by the way, the random stuff can be used of casting spells? i mean... can be created a floating text with the name of the casting spell?? im looking for it. but cant find the "name of casting spell" can u help plz? |
| 11-11-2003, 11:29 AM | #6 |
I believe you need to do a "Convert to string" and then theres a "ability name" and under that you would choose "ability being cast" or what ever would pertain to your event. But I ain't infront of WE right now, so I can't be sure on its exact method. Sorry. EDIT: Correction, I was wrong, I opened WE and the closest thing is "Convert Order to String"... You don't want to use that, trust me. Because the "Order" strings look funny, have no spaces, and sometimes just don't make sense. And example that would look funny is if someone cast "Flame Strike" the order would show as "flamestrikeon"... Same with unit types, a "Fel Orc Grunt" internal name (which is what the string returns) is "chaosgrunt"... My advice. Store all your strings in a variable array (like above) but instead do something like this. AbilityStr[1] = Flame Strike AbilityStr[2] = Mana Burn AbilityStr[3] = Blizzard And then do an If/Then/Else If Ability being cast is equal to flamestrike create floating text at position of casting unit AbilityStr[1] else do nothing If Ability being cast is equal to manaburn create floating text at position of casting unit AbilityStr[2] else do nothing And so on and so forth. |
| 11-11-2003, 11:53 AM | #7 |
well all conversions are in "conver real to string" or "order to string" etc etc etc... well... if u can tell me later will be cool too :D |
| 11-11-2003, 11:54 AM | #8 |
oh sorry didnt read the edited"... .thanks.. |
