Full Version : Relative X1_Y1 & X2_Y2
xmlspawner >>XMLSpawner Feature Request's >>Relative X1_Y1 & X2_Y2


<< Prev | Next >>

godfood- 01-19-2006
Ok, Look at the Puzzle Bridge Tutorial for example. If i wanted to make the puzzlebridge.xml file a plop and play addon, I would need to be able to define the spawnable area to relative coords to the spawner's (X,Y,Z). I tried SETONTHIS/X1_Y1/(<GETONTHIS,x>,<GETONTHIS,y>,<GETONTHIS,z>) and SETONTHIS/X1_Y1/(GETONTHIS,x,<GETONTHIS,y,GETONTHIS,z) Both of those gave me the X1_Y1 is not properly formatted, As I assumed it would. But I wanted to try it before I posted. Then I thought about using variables, but realized I had no idea how to use them to achieve this.

It might be a nice feature to add something like this:

(Photoshoped Image)
user posted image

and have it null out whichever one you are not using.

Just a thought Arte, I know you have a lot of things to do as is. I just thought this might be a fairly simple feature to add, And usefull as well.

ArteGordon- 01-20-2006
actually, it is already maintained in relative coords. The X1Y1 X2Y2 thing is just to allow you to see and define the current absolute coords.
Although those internal relative coords are not currently accessible. I'll look into it.

godfood- 01-20-2006
That would be helpful as i have a few plop and play thing's I'd like to release.

ArteGordon- 01-20-2006
the only thing that I dont like about it is that it gives yet another overlapping way of setting up the spawn area( already have spawnrange and X1Y1/X2Y2), so more property clutter.

godfood- 01-20-2006
It wouldn't have to be like the image, I could handle having something like the "SETONTHIS/X1_Y1/GETONPARENT,X+10/Y+10". That is if you're talking about your valuable Gump Real Estate. If you're talking about the code...Well... I guess I'm sol then. I don't need it pretty, just the ability to do it.

Another Idea, (If you were refering to the gump real estate and not the code) You could have it look for a "+" a "-" or a "0" coord in the X1_Y1 and if found, it would switch to Relative mode. Just a thought.

ArteGordon- 01-20-2006
yeah, I would expose them as properties (X,Y,Width, Height) that could be set in a spawner entry or with [xmlset, but they would not appear in the properties gump (due to the real estate issue)

Those are the properties that get saved out to XML anyway, not the X1_Y1/X2_Y2 values.

godfood- 01-20-2006
So, when I xmlloadhere a spwner with X1_Y1 it will update it's spawn area to the new location? Basically making this whole thread pointless...unless i wanted to change the spawnable area on the fly?

ArteGordon- 01-20-2006
right. X1_Y1/X2_Y2 get automatically updated to the new location if you move, place, or load a spawner.

You basically never really set X1_Y1/X2_Y2. You specify them when you manually define an area, but then they are immediately translated into X,Y,Width,Height. Then when you load, move, or place a spawner, the X,Y,Width,Height are used to calculate updated X1_Y1/X2_Y2 coordinates.

So basically, as you said, having direct access to X,Y,Width,Height would allow you to more easily change the spawning area on the fly (on an already placed spawner).

godfood- 01-20-2006
Ah, well I can't think of any use for that right off hand. But when I come up with something I'll bug you about it again tongue.gif.

Thanks for the Help Arte smile.gif.