• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Terrain Triggering Questions (Tile on Top?) (Loop limit?)

Status
Not open for further replies.
Level 3
Joined
Mar 1, 2018
Messages
41
I've started experimenting with terrain triggering, either with the getrectminX or just using plain coordinates.

I have a part here I replace 2 tiles, one with redstones and other with whitebricks.

- The problem now is that I want the bricks on top, so that I get their border, but instead I get the stones on top but that border would fit well for a diferent application.

I now I can edit my tileset to change how my tiles behave, but once I trigger new tiles, I have no clue wich tile will be on top, and why is that tile on top and how do I control that.

Changing the order of the loops is pointless, since in the end the tiles will behave the same.

I've been trying a few diferent things and I just want some cityscape tyles to be on top of some cavestones...
 
Last edited:
Level 12
Joined
Jan 30, 2020
Messages
875
Hello there !

Well you might have noticed that there aren't so many natives to alter terrain ingame:
JASS:
native GetTerrainCliffLevel         takes real x, real y returns integer
native SetWaterBaseColor            takes integer red, integer green, integer blue, integer alpha returns nothing
native SetWaterDeforms              takes boolean val returns nothing
native GetTerrainType               takes real x, real y returns integer
native GetTerrainVariance           takes real x, real y returns integer
native SetTerrainType               takes real x, real y, integer terrainType, integer variation, integer area, integer shape returns nothing
native IsTerrainPathable            takes real x, real y, pathingtype t returns boolean
native SetTerrainPathable           takes real x, real y, pathingtype t, boolean flag returns nothing

So the only way to control what tile is on top of another tile still exclusively remains in the world editor choosing custom tileset and moving tiles in the list to the left or the right as this dictates the priority.
I am not sure there is any way to override this with the current natives, and I believe it can't be done in normal ways.
 
Level 12
Joined
Jan 30, 2020
Messages
875
Oh... so its a kind of custom tile model?

I use something similar to display text on the floor of my map. It is a "Letter" model that I can change with animations to display other characters.

If you assign that model to a destructable, you could display your tile as at will.

But note you cannot move a destructable once created. This said you can create it with a z position : native CreateDestructableZ takes integer objectid, real x, real y, real z, real face, real scale, integer variation returns destructable

I suppose you could then kill it or change its animation if it has a death animation to not display it anymore.

EDIT :
I wanted to make a new screenshot to show you but my map is in a mess currently as I am changing major parts of the code, but I found an old one to illustrate :

WC3ScrnShot_041020_010507_001.png


Note that instead of Letters, my model could even display up to 81 different tile textures !!!!!

If you are interested, let me know.
 
Last edited:
Status
Not open for further replies.
Top