HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

problem with convert string to unit-type

07-16-2003, 12:18 AM#1
LunarCrisis
Here's my trigger. (levelnumber = 1 by the way) (also notice the extra space after "Level")

Unit - Create 20 (Unit-type((Level + (String(levelnumber))))) for Neutral Hostile at (Center of Top Left spawn door <gen>) facing (Random real number between 0.00 and 360.00) degrees

I have a custom unit with the name "Level 1", but this action doesnt seem to be creating the units and I can't figure out why :S
07-16-2003, 12:22 AM#2
Pesmerga
Hehe, I think your going at it a quite unique way. Unless youve done it before, I dont believe you can check units by strings. Use interger arrays. Butttt, if levernumber = 1 automatically, then adding 1 will give you 2, thus making Level 2.
07-16-2003, 12:25 AM#3
LunarCrisis
what do you mean by "check units by strings"?
Quote:
Butttt, if levernumber = 1 automatically, then adding 1 will give you 2, thus making Level 2.

where do I add 1?
07-16-2003, 12:29 AM#4
Pesmerga
(Unit-type((Level + (String(levelnumber)))))

Unless you start at level 0, you will get levelnumber 2.
07-16-2003, 12:42 AM#5
LunarCrisis
oic, lol the copy as text function leaves some to be desired.

thats actually concatenating the strings: "Level " and the integer variable levelnumber

guess that wasnt too clear
here: picturage :p
07-16-2003, 12:47 AM#6
Pesmerga
LoL! Well, your trigger looks good to me. Dont know whats wrong with it. I havent had the time to do anything WC3 for the last.....year, so I forgot alot.