Page 1 of 1

Set an integer to terrain type...

Posted: Thu Jul 09, 2009 12:05 pm
by manstie
I noticed in your sliding system...

Code: Select all

	set udg_Slide = 'Nice'
	set udg_Slide2 = 'Idki'
	set udg_Slide3 = 'Iice'
	set udg_Slide4 = 'Glav'
	set udg_TerrainKill = 'Nsnw'
All of the variables that are set, are integers.
Yet you seem to change them to terrain types?
Also could I use the GUI Custom Text thing to just add those into map init instead of having a different trigger?

Re: Set an integer to terrain type...

Posted: Thu Jul 09, 2009 12:42 pm
by 3ICE
Those expressions are still integers. I could write it as either 5138787 or 'Nice'. Which one looks better? It's obvious. (5138787 == 'Nice')
(EDIT: Yes, in the future I will convert every terraintype for you into normal integer numbers, so you can set them without JASS. How awesome is that?)

Please learn JASS. I'm not going to explain integers to you, because I don't want to duplicate information that is already available elsewhere. Go and read it. (You can use decimal, hexadecimal, octal, 1ascii and 4ascii integers in JASS. Respectively: 333, 0xFA0, 012475, 'X', 'AsCx')

My system was written for RoC. There is no Custom Text in RoC, so I had to use a JASS trigger. But if your map is TFT, then feel free to use TFT functions and merge the two init triggers into one.