-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func_breakable not working properly #160
Comments
I've seen this on some EF maps, I don't think I actually added that bit of code, although I don't remember. been a long time. . If I remember correctly it worked a bit differently than ef. Here is what we had on the breakable objects:
Not being a level designer I don't know the specifics of what varies between ef and trep. Does the above work? There was an old test map called glass_test which the glass doesn't break, If I remember correctly that was just to test the glass shader. Are there any stock trep maps that have breakable glass? For the life of me I can't think of one. |
Ok.. I did add it in... At a bit of a loss why it wouldn't work though: `oid SP_func_breakable( gentity_t *ent ) // Make it appear as the brush // Lets give it 5 health if the mapper did not set its health ent->health = health; // Let it take damage // Let it know it is a breakable object // If the mapper gave it a model, use it ent->use = UseBreakable; // See above -Vincent // Link all ^this^ info into the ent Can you give me a test map with some breakables on it so I can test with? |
i have never altered the “entities.def” file before, so i dont really know what all is in it.
heres a copy of my test room, & a few extra textures that are used in it. all shader functions inside the test room you should already have & should work. if not let me know whats not working.
inside the test room you will see stairs to your right of entrance. up those stairs is a platform glass floor with all known entities from voyager except flags. the four pieces of floor glass are all FUNC_BREAKABLE & have 100 health. each piece has a different sound attribute attached to them so they should make a sound when broken. you cant see them but you can walk on them & when destroyed you will fall through them.
another small issue i am having - you will notice an electric field covering the entrance to a room. i have a speaker located there that is supposed to be using a sound clip from the game that sounds like electricity. i think it was from one of the weapons. when i first compiled it, the sound worked. after i compiled it again it stopped working & i cant figure out why.
the test room is attached below
On Monday, December 25, 2017 8:01 AM, Shafe Shaffer <[email protected]> wrote:
Ok.. I did add it in...At a bit of a loss why it wouldn't work though:`oid SP_func_breakable( gentity_t *ent )
{
int health;// Make it appear as the brush
trap_SetBrushModel( ent, ent->model );// Lets give it 5 health if the mapper did not set its health
G_SpawnInt( "health", "0", &health );
if( health <= 0 )
health = 5;ent->health = health;// Let it take damage
ent->takedamage = qtrue;// Let it know it is a breakable object
ent->s.eType = ET_BREAKABLE;// If the mapper gave it a model, use it
if ( ent->model2 )
ent->s.modelindex2 = G_ModelIndex( ent->model2 );ent->use = UseBreakable; // See above -Vincent// Link all ^this^ info into the ent
trap_LinkEntity (ent);
}
`Can you give me a test map with some breakables on it so I can test with?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
can you email me that test map. it didn't show up here. |
hi Shafe
did you get the test map i sent again? - what did you think of the flag design pic i sent?
On Tuesday, January 2, 2018 9:48 PM, Shafe Shaffer <[email protected]> wrote:
can you email me that test map. it didn't show up here.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yep. I got the test map, haven't had a chance to hop on there yet, working long hours this week (I am a programmer/server admin). I did look at the flags.. I'll respond to that here in a minute. |
Obviously I flaked on this, when I got slammed... and totally lost what was happening... is this still an issue? |
it makes the object that is breakable, invisible & no breaking sound
The text was updated successfully, but these errors were encountered: