Raised This Month: $ Target: $400
 0% 

Creating a zone box


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 06-26-2007 , 00:48   Re: Creating a zone box
Reply With Quote #5

Ok thanks stupok69. I understand how this works now.

I am having a problem though. I can see the box outlined in TE_BOX, but some reason it's not blocking my player. I have the solid type set to BBOX so the whole box I created should block the player.

The line...
"entity_set_size(ent, mins, maxs);"
should set the size to be blocked correct? Some reason it isn't working

btw I use engine as you can see : /

PHP Code:
    ent create_entity("info_target");
    
entity_set_string(entEV_SZ_classname"safebox_blue");
    
entity_set_int(entEV_INT_solidSOLID_BBOX);
    
entity_set_int(entEV_INT_movetypeMOVETYPE_FLY);
    
origin[0] = float(1663);
    
origin[1] = float(3411);
    
origin[2] = float(679);
    
entity_set_origin(entorigin);
    
    
mins[0] = origin[0] - float(255);
    
mins[1] = origin[1] - float(115);
    
mins[2] = origin[2] - float(71);
    
    
maxs[0] = origin[0] + float(255);
    
maxs[1] = origin[1] + float(115);
    
maxs[2] = origin[2] + float(71);
    
    
entity_set_size(entminsmaxs); // This sets the blocking size?
    
    
message_begin(MSG_BROADCASTSVC_TEMPENTITY);
    
write_byte(31); // TE_BOX
    
write_coord(floatround(mins[0])); // boxmins
    
write_coord(floatround(mins[1]));
    
write_coord(floatround(mins[2]));
    
write_coord(floatround(maxs[0])); // boxmaxs
    
write_coord(floatround(maxs[1]));
    
write_coord(floatround(maxs[2]));
    
write_short(999999); // life in 0.1 s
    
write_byte(255); // r
    
write_byte(0); // g
    
write_byte(0); // b
    
message_end(); 

Last edited by hlstriker; 06-26-2007 at 00:51.
hlstriker is offline
 



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 21:35.


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