AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Wall entity solid problem (https://forums.alliedmods.net/showthread.php?t=204827)

terryoh 01-03-2013 20:47

Well I created a entity with a model of a wall by a command in front of a player.I almost succeded ..except one wierd bug. The wall is created as I wanted to, depending on the angles of the player and creates the solid area of the entity as so, if it's created in one direction everything it's oky: the entity is solid on touch and bullets cannot pass the entity but if the wall it's created in other direction the entity it's still solid on touch but bullets can pass and can make damage even through it here's the code I made to set the mins/maxs and angles for my enitity:
PHP Code:

pev(idpev_anglesangles);
    
    
angles[0]=0.0
    
if((angles[1]>=45.0 && angles[1]<=135) || (angles[1]>=-135 && angles[1]<=-45.0))
    {
        
MinBox[0] = -85.0
        MinBox
[1] = -10.0
        MinBox
[2] = -25.0
        MaxBox
[0] =  85.0
        MaxBox
[1] =  10.0
        MaxBox
[2] =  135.0
        angles
[1] = 90.0;
    }
    else
    {
        
MinBox[0] = -10.0
        MinBox
[1] = -85.0
        MinBox
[2] = -25.0
        MaxBox
[0] =  10.0
        MaxBox
[1] =  85.0
        MaxBox
[2] =  135.0
        angles
[1] = 180.0
    
}
    
set_pev(tmpWallpev_originorigin)
    
set_pev(tmpWallpev_anglesangles)
    
entity_set_size(tmpWall,MinBox,MaxBox

The entity is SOLID_SLIDEBOX and it movetype is MOVETYPE_NOCLIP


MERGE EDIT 1
A video that is more explicit than my explication(watch it on 720p to view the chat also):
http://www.youtube.com/watch?v=vOv_zvIs1CM


All times are GMT -4. The time now is 13:34.

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