• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

Auto-align problem

Started by bigbadbogie, October 17, 2008, 08:35:27 PM

Previous topic - Next topic

bigbadbogie

Not really a glitch, but for some reason when any gun-tower with no baseplate is placed somewhere on a map, it automatically aligns/centres itself with the terrain.

I am just wondering if there is a way to turn it off as it is causing an object to be realigned when replaced by dll.
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

GreenHeart

The alignment code was replaced in 1.3.  I think you might be able to get around it by using one of these. 

ownsTerrain = 0
IsTerrain = 0


The alignment code goes by the bounding box of the entire model so you could add a polygon face that is scaled extremely small so the human eye can't see it.    This could change the bounding box in such away that the center of the bounding box is where you want the object to be auto aligned.    For examples go download the xsi for the 1.3 & check out the tunnel sections to see what i mean.   I'm not sure why ken changed the alignment code.  The __h  or hp_ flags don't get included in the bounding box creation so adding the extremely small face is the only way if the odf flags don't work.


Signature:
Many failures will take place in the process of attempting to achive your goal. It don't matter how many times you fail, Its how much you've learned each time since its apart of the learning process.

bigbadbogie

ownsTerrain = 0 removes the collision.
IsTerrain = 0 does nothing.

I don't want the object to auto-align at all.

Regular objects such as powered class, commbunker, i76building do not auto-align, but are impractical due to another glitch caused by moving buildings at high speed with dll; they tend to vanish out of thin air.

I need it to be a gun-tower and I need it to not auto-align with the terrain.
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

Nielk1

Oh so you are trying to place it freely but it is locking to the grid anyway? I thought any class lacking a terrain__h could be freely placed in the editor but forced to align if made by a constructor. (IE jammers)

Click on the image...

General BlackDragon

[GameObjectClass]
AlignTerrainReplaceType = 0

   Possible values are 0..4. They break down as following:
0: Should be same as pb4
1: Uses new centering code from 69q, but alternate offset
2: Closer calculations to 69n4, same offset as 0
3: Closer calculations to 69n4, same offset as 1
4: Closer calculations to 69n4, another offset type.

   I'm not sure if any of these values produces the desired results.
Please test. If none of the flags give the desired results, please be
*as specific as possible*. Also, do check that objects build at the
same place the preview images show. [NM]

??



*****General BlackDragon*****

Avatar

Guntowers are strange animals to begin with, as they're vehicles pretending to be buildings...  but then that's a BZ tradition...  :)   

I think the answer here is going to be 'no'...  because it sounds like you're placing and aligning an object somewhere specific in the editor and then replacing it via DLL and the DLL is somewhat more limited in this respect.  It has it's own set of rules and auto-alignment for terrain owning buildings is one of them.

I think the best bet is to create the initial object already offset by linking it to a dummy object that's centered on a terrain square, and then making sure you're grabbing the rotation of the original building as well as position for replacement.  I've had to make many such 'specialty' objects to get certain ideas to work.  (Bomber Bays, for instance.)

Nielk1

If the DLL is replacing it, store its position matrix, replace it, then move it to that position matrix. As long as there is no terrain plate it won't cause any terrain tearing.

Click on the image...

bigbadbogie

That makes it visually jolt back N1.

GBD - they only change the direction that it aligns to.

I can't see any way around this other than a pb4b bug fix. (Just a little bit unlikely.)
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

TheJamsh

remember that if you want to do that, you wont be able to put a terminal that works on the thing. itll be there, but you wont be able to 'access it' thats for owning buildings only...

make a transparent baseplate and 'tap' the gun tower to it?


BZII Expansion Pack Development Leader. Coming Soon.

Nielk1

I know in C++ it won't jump back because I can move the object in the same execution step it is created.

Click on the image...

bigbadbogie

Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

OvermindDL1

Quote from: bigbadbogie on October 18, 2008, 02:30:22 PM
That makes it visually jolt back N1.
Only in the scriptor, not in C++ (or python), use C++ (or python).

You could probably also turn up the amount of lines executed per tick in the scriptor...

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey


bigbadbogie

It doesn't matter anymore. I found another way to do it without a gun-tower class.
Others would merely say it was good humour.


My BZ2 mods:

QF2: Essence to a Thief - Development is underway.

Fleshstorm 2: The Harvest - Released on the 6th of November 2009. Got to www.bz2md.com for details.

QF Mod - My first mod, finished over a year ago. It can be found on BZ2MD.com

TheJamsh

job done... care to say exactly what you were doing?


BZII Expansion Pack Development Leader. Coming Soon.

General BlackDragon

spawn and replace both with DLL via a pathpoint?



*****General BlackDragon*****