Raised This Month: $ Target: $400
 0% 

[TF2] Set Engineer Building Collision Height/Width?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Boonie
Member
Join Date: Aug 2015
Old 09-06-2015 , 23:03   [TF2] Set Engineer Building Collision Height/Width?
Reply With Quote #1

Is there a way to change the height of an engineers building so building cant be built in some places.

Say I have a box that is 73 Hammer-Units tall, I can build a level 3 sentry in said box. But is there a way to increase the collision of the sentry (I guess collision, I'm not sure what it would be?) to, say, 80 HU so if I try to build inside that box, it wont build? So the sentry would stay the same size, the jump height onto the sentry stays the same, but the minimum distance needed to build is changed?

I have tried setting the below, but I will keep looking for something that will work.
m_vecSpecifiedSurroundingMinsPreScaled & Max
m_vecSpecifiedSurroundingMins & Max
m_vecSurroundingMins & Max
m_vecBuildMins & Max
m_vecMins & Max

So m_vecBuildMins is to set the building height, it kind of works, but not how I want it too. If I use it on sentrys or dispensers, it works fine, but on teleporters, if I set the height high, when I crouch, the teleporter ducks underground so you cannot build it. This is only when you are standing under something. Any ideas?

This is before I change m_vecBuildMins & max


After

Last edited by Boonie; 09-07-2015 at 04:39.
Boonie is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 09-07-2015 , 09:10   Re: [TF2] Set Engineer Building Collision Height/Width?
Reply With Quote #2

Iirc some the tests for build objects is haed coded for mims and maxs.
Have you tried modelscale?
Also, you can adjust the mins to raise it if needed.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Boonie
Member
Join Date: Aug 2015
Old 09-07-2015 , 09:32   Re: [TF2] Set Engineer Building Collision Height/Width?
Reply With Quote #3

I haven't tried m_flModelScale, but wouldn't that just do what it says, and scale the model?

And you can't actually raise the mins, if you do, the building hovers above the floor
Boonie is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 09-07-2015 , 13:44   Re: [TF2] Set Engineer Building Collision Height/Width?
Reply With Quote #4

From stt

PHP Code:
void Building_SetScale(int iBuildingfloat flScale)
{
    
SetEntPropFloat(iBuildingProp_Send"m_flModelScale"flScale);

    
// Set the bounds of the building blueprint, without this, the engineer could get stuck in his own building!
    
float flMins[3];
    
float flMaxs[3];
    
GetEntPropVector(iBuildingProp_Send"m_vecBuildMins"flMins);
    
GetEntPropVector(iBuildingProp_Send"m_vecBuildMaxs"flMaxs);
    
ScaleVector(flMinsflScale);
    
ScaleVector(flMaxsflScale);
    
SetEntPropVector(iBuildingProp_Send"m_vecBuildMins"flMins);
    
SetEntPropVector(iBuildingProp_Send"m_vecBuildMaxs"flMaxs);

PHP Code:
Building_SetScale(sentry2.0
__________________
Benoist3012 is offline
Boonie
Member
Join Date: Aug 2015
Old 09-07-2015 , 22:08   Re: [TF2] Set Engineer Building Collision Height/Width?
Reply With Quote #5

That is very close to what I had. But it does not change the height at which you can build under. Scaling it does nothing for the min and max for the height.

PHP Code:
    int entity = -1;
    while ((
entity FindEntityByClassname(entity"obj_teleporter")) != -1) {
        if (
IsValidEntity(entity)) {
            
SetEntPropVector(entityProp_Send"m_vecBuildMins"view_as<float>({-28.0, -28.00.0}));
            
SetEntPropVector(entityProp_Send"m_vecBuildMaxs"view_as<float>({28.028.075.0}));
        }
    } 

Last edited by Boonie; 09-07-2015 at 22:09.
Boonie is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:04.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode