Raised This Month: $ Target: $400
 0% 

Wall entity solid problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
terryoh
Member
Join Date: Apr 2010
Old 01-03-2013 , 20:47  
Reply With Quote #1

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

Last edited by YamiKaitou; 01-04-2013 at 08:43.
terryoh 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 13:34.


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