Raised This Month: $275 Target: $400
 68% 

Max Z Stock


Post New Thread Reply   
 
Thread Tools Display Modes
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-15-2018 , 12:39   Re: Max Z Stock
Reply With Quote #21

Quote:
Originally Posted by Bugsy View Post
Ok, if you notice any issues, try to remember where you were on which map so it can be troubleshooted why you are having an issue. There may be unhandled CONTENTS_ values that will need to be added in the code.
Ok I'm gonna actually save the origins when it happens, I'm testing on de_mon. Thanks!
__________________
~ Turn incapability into motivation. ~
edon1337 is offline
Send a message via Skype™ to edon1337
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-16-2018 , 14:39   Re: Max Z Stock
Reply With Quote #22

Finally I got stuck lol
@Bugsy
Quote:
X: 1710 | Y: 2657 | Z: 3884
__________________
~ Turn incapability into motivation. ~
edon1337 is offline
Send a message via Skype™ to edon1337
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-17-2018 , 21:15   Re: Max Z Stock
Reply With Quote #23

Get the PointContents values. One at that origin and one + 75 units on the Z.
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init() 
{
    
register_clcmd"say a" "Test" );
}

public 
Testid )
{
    
client_printid print_chat "PointContents=%d" engfuncEngFunc_PointContents , { 1710.0 2657.0 3884.0 } ) );
    
client_printid print_chat "PointContents=%d" engfuncEngFunc_PointContents , { 1710.0 2657.0 3959.0 } ) );

__________________

Last edited by Bugsy; 07-17-2018 at 21:17.
Bugsy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-18-2018 , 19:21   Re: Max Z Stock
Reply With Quote #24

Quote:
Originally Posted by Bugsy View Post
Get the PointContents values. One at that origin and one + 75 units on the Z.
PHP Code:

#include <amxmodx>
#include <fakemeta>

public plugin_init() 
{
    
register_clcmd"say a" "Test" );
}

public 
Testid )
{
    
client_printid print_chat "PointContents=%d" engfuncEngFunc_PointContents , { 1710.0 2657.0 3884.0 } ) );
    
client_printid print_chat "PointContents=%d" engfuncEngFunc_PointContents , { 1710.0 2657.0 3959.0 } ) );

Both returned CONTENTS_SKY
edon1337 is offline
Send a message via Skype™ to edon1337
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-18-2018 , 19:29   Re: Max Z Stock
Reply With Quote #25

Which map is this
__________________
Bugsy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-18-2018 , 19:37   Re: Max Z Stock
Reply With Quote #26

Quote:
Originally Posted by Bugsy View Post
Which map is this
de_mon

Link: https://gamebanana.com/maps/149930
edon1337 is offline
Send a message via Skype™ to edon1337
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-19-2018 , 07:08   Re: Max Z Stock
Reply With Quote #27

@Bugsy,

for some reason, your stock doesn't seem to work for my Supply Drop entity, it just randomly spawns it in a stuck area, not even in the sky.
edon1337 is offline
Send a message via Skype™ to edon1337
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old 07-21-2018 , 18:13   Re: Max Z Stock
Reply With Quote #28

@Bugsy,

I did more tests, apparently your stock makes the entities spawn in an under-ground area which exists for an unknown reason, if someone knows a valid reason for this place to exist, feel free to enlighten me,
Code:
PHP Code:
MakeAirDropEnt( )
{
    new 
iEnt engfuncEngFunc_CreateNamedEntityengfuncEngFunc_AllocString"info_target" ) );

    new 
Float:fOrigin];
    
GetRandomOriginfOrigin );
    
    
log_to_file"Origin.txt""#1 %.1f %.1f %.1f"fOrigin], fOrigin], fOrigin] );
    
    
fOrigin] = GetMaxHeightiEntfOrigin );
    
log_to_file"Origin.txt""#2 %.1f %.1f %.1f"fOrigin], fOrigin], fOrigin] );
    
    
engfuncEngFunc_SetOriginiEntfOrigin );
}

public 
Float:GetMaxHeightiEntFloat:fOrigin] ) 

    new 
pcCurrent;
    
    while( 
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_EMPTY )
    {
        
fOrigin] += 5.0
    }
    
    
pcCurrent engfuncEngFunc_PointContents fOrigin ); 

    return ( ( 
pcCurrent == CONTENTS_SKY ) || ( pcCurrent == CONTENTS_SOLID ) ) ? fOrigin] - 75.0 fOrigin];
}

GetRandomOriginFloat:fOrigin] )
{
    new 
iArraySize ArraySizeg_aOrigins );
    
    
ArrayGetArrayg_aOriginsrandom_num0iArraySize ), g_iOriginsData );
    
    
fOrigin] = g_iOriginsDataORIGIN ][ ];
    
fOrigin] = g_iOriginsDataORIGIN ][ ];
    
fOrigin] = g_iOriginsDataORIGIN ][ ];
    
    return 
PLUGIN_CONTINUE;

Debug:
PHP Code:
L 07/22/2018 00:08:34#1 -1267.2 1740.2 -3386.8
L 07/22/2018 00:08:34#2 -1267.2 1740.2 -1481.8 
Picture of this mysterious place:
https://ibb.co/cScO8d
__________________
~ Turn incapability into motivation. ~

Last edited by edon1337; 07-21-2018 at 18:17.
edon1337 is offline
Send a message via Skype™ to edon1337
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old Yesterday , 11:45   Re: Max Z Stock
Reply With Quote #29

Quote:
Originally Posted by edon1337 View Post
Both returned CONTENTS_SKY
I used the -75.0 using a player, try increasing this little by little (-85.0, -95.0, etc) until your entity does not get stuck.

Quote:
Originally Posted by edon1337 View Post
@Bugsy,

I did more tests, apparently your stock makes the entities spawn in an under-ground area which exists for an unknown reason, if someone knows a valid reason for this place to exist, feel free to enlighten me,
Where did you get these random origins from? Are all of these origins located within a CONTENTS_EMPTY area?
__________________
Bugsy is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Traphouse
Old Yesterday , 12:35   Re: Max Z Stock
Reply With Quote #30

Quote:
Originally Posted by Bugsy View Post
Where did you get these random origins from? Are all of these origins located within a CONTENTS_EMPTY area?
They're generated from joropito's superspawns.
__________________
~ Turn incapability into motivation. ~
edon1337 is offline
Send a message via Skype™ to edon1337
Reply


Thread Tools
Display Modes

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 02:03.


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