HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

GetTerrainTile().... Possible?

11-01-2003, 11:46 PM#1
35263526
Is it possible to find the tile used on a point of terrain? I know its not possible in GUI, but I though maybe in JASS.
11-02-2003, 02:49 AM#2
-={tWiStÄr}=-
why dont you just put a region on the tile and refer to that instead?
11-02-2003, 01:25 PM#3
35263526
You misunderstand me. I want to be able get the actual tile used (i.e Black Tiles, Grass) on any point on the map.
11-02-2003, 02:01 PM#4
KaTTaNa
Nope, it is impossible :(
11-02-2003, 03:29 PM#5
35263526
That annoys me. Very much. Anyone know why it is impossible?
11-02-2003, 04:26 PM#6
KaTTaNa
Why? Well, maybe you wanted to make units lose hitpoints if they were walking on lava or something?
11-05-2003, 09:43 PM#7
STR-Erzwinkel
It is possible.

1. Save the minimap of your map.
2. Write a standalone program that reads in the TGA minimap and generates JASS code which in turn initializes an array(or more arrays) holding the information for each tile.
3. paste the JASS code into the editor.

Note: That your initialization trigger will be very long. In order to prevent JASS from stopping the trigger before it's done insert wait statements every n steps.
11-05-2003, 09:45 PM#8
35263526
Hmm, an interesting idea.

Maybe possible, I'll have a look.
11-05-2003, 09:51 PM#9
PitzerMike
would be possible but not worth the effort - in my opinion
11-05-2003, 09:56 PM#10
STR-Erzwinkel
It is not that difficult. Sometimes precalculating some stuff is easier than trying it in JASS.
Nice is that you can debug everything and make sure that your data is correct without starting up warcraft all the time.
11-05-2003, 09:56 PM#11
35263526
If I got it done, then I wouldn't have to do any other work if I wanted the same system on other maps. In the end it'd probably be more work to set up a seperate system on each map.

Basically I want different types of terrain to do different things to objects on them. I also need a slope detection system, but thats for a different post.
11-05-2003, 10:41 PM#12
STR-Erzwinkel
uhm slope is tough. because you cant get it via the minimap. and AFIK you can't get via JASS.
11-06-2003, 01:08 PM#13
PitzerMike
Why use the minimap?
Analyze the w3e file (the terrain file).

The w3e file format is easy enough.
11-06-2003, 05:06 PM#14
35263526
I don't know. I am quite knowledgeable about image processing in several languages, but I know nothing about that format. Are there any guides availables?
11-06-2003, 05:09 PM#15
Cacodemon
... Another idea is to create program which reads w3e and converts it to region-type (NOT rect!) array. Regions allow you to join several rectangles (rects) to one complex region. You can convert terrain with same tile to one region. And then process these regions with your triggers.