Raised This Month: $ Target: $400
 0% 

entity_set_model, but entity lososes hitbox


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-30-2004 , 11:15   entity_set_model, but entity lososes hitbox
Reply With Quote #1

when i use entity_set_model the model of the entity gets changed but it looses its hitboxes
(im using it for NS to change armory and cc model for combat, armory has then no hitbox so that u can walk through it and noone can attack it but rines still can use it get get ammo)
anyone know how to fix it?
__________________
alias White Panther
karlos is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-30-2004 , 13:39  
Reply With Quote #2

just found a solution but i dont really like it: (get hitboxes and origin, set model, write its hitboxes and origin)
Code:
entity_get_vector(entid, EV_VEC_origin, orig) entity_get_vector(entid, EV_VEC_mins, MinBox) entity_get_vector(entid, EV_VEC_maxs, MaxBox) entity_set_model(entid,"model.mdl") entity_set_vector(entid, EV_VEC_mins, MinBox) entity_set_vector(entid, EV_VEC_maxs, MaxBox) entity_set_origin(entid, orig) entity_set_int(entid,EV_INT_solid,2)
__________________
alias White Panther
karlos is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 08-30-2004 , 14:02  
Reply With Quote #3

Eh, those aren't hit boxes, they're boundries really, just another way to make the entity solid.

The hitboxes of the entity you changed the model of should still be there. If it isn't then you did something wrong when you set the model to the ent.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 08-30-2004 , 15:21  
Reply With Quote #4

hitboxes boundries, does not matter but without it u can walk through the model and u can attack it
__________________
alias White Panther
karlos is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 08-30-2004 , 17:15  
Reply With Quote #5

Yeah it does make a difference because hitboxes are exactly what they're name implies, they are boxes on the model which will act upon the entity when shot or taken damage by another entity.

Anyways, what you did should be fine.
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
Downtown1
Veteran Member
Join Date: Mar 2004
Old 08-31-2004 , 12:55  
Reply With Quote #6

Yeah, if people can walk through it, but can't shoot it, what's to prevent them walking in it and hiding ? .
Downtown1 is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 09-06-2004 , 05:37  
Reply With Quote #7

You need to set EV_INT_solid to some value. Look in engine_const.inc.
BBoxes need to be right as well.
Johnny got his gun is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 09-06-2004 , 08:34  
Reply With Quote #8

jonny look at 2nd post, there is "entity_set_int(entid,EV_INT_solid,2)", but that alone dont work, this has to be set too
Code:
entity_set_vector(entid, EV_VEC_mins, MinBox) entity_set_vector(entid, EV_VEC_maxs, MaxBox) entity_set_origin(entid, orig)

btw: u can also use:
Code:
pev(entid, pev_size, MinBox, MaxBox) //get site entity_set_model(entid,"mymodel.mdl") //set_pev(entid,pev_model,"mymodel.mdl") is not working, dont know why set_pev(entid, pev_size, MinBox, MaxBox) //set size
but its not working on all entitys, on some its give runtime errors (eg. NS b5 if ent is command chair)
__________________
alias White Panther
karlos is offline
Ingram
Veteran Member
Join Date: May 2004
Old 09-06-2004 , 14:35  
Reply With Quote #9

u can use EngFunc_SetModel
Ingram 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 17:21.


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