RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Always locX?

From a quick look at your code if the Z axis of your starting tile is -5 or less you will always loop. You are moving and checking X (east/west) and Y (north/south) but nothing appears to be moving your Z (up/down) for locXZ.
 

Vhaldir

Sorceror
(Updated the code above to make locXZ and locYZ more 'legible')

locX_Z = landTileX.Z; //Update to the Z coordinate to the tile we're checking
and
locY_Z = landTile.Z; //Update to the Z coordinate to the tile we're checking
update the Z-check coordinate to the current tile's Z value.. the issue is, it doesn't seem to be incrementing locX for some reason
Code:
for (int locX =  target.X; locXZ <= -5 && dir.X == 1 ? locX < 7158 : locX > 0); locX += dir.X )

the 'debug' output is always:
"locX: (always the same X), locY: (always the same Y)"
"Direction: (X:1, Y:0)"

Thanks though!
 

Vhaldir

Sorceror
Actually, I intend to release the complete system once it's finished. ;)

What I'm working on is a procedural generator for player terraforming, using Praxiiz's UltimaLive system.
The objective is to allow players to edit the map by performing various actions (harvest grass, dig dirt/holes, mine rock, collect water, etc), and then be able to place those objects if the parameters are met (in this specific piece, I was developing water placement.)
 
Top