AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Bullet decals (https://forums.alliedmods.net/showthread.php?t=84397)

MPNumB 01-25-2009 11:13

Bullet decals
 
I was wondering some things about bullet decals:

1. How can I write a message with bullet spark on the wall?
2. How can I write a message with bullet decal on the wall?
3. How can I hook where bullet decal was writed?
4. How can I write a message with blood decal on a player?
5. How can I hook when blood from player was sprayed out?
6. How can I write a message with a bullet part falling out of the gun?
7. How can I hook when bullet part fals out of the gun?

Arkshine 01-25-2009 11:37

Re: Bullet decals
 
What about to start to search a bit yourself ?

1. TE_GUNSHOTDECAL
2. TE_DECAL if entity ; TE_WORLDDECAL if worldspawn.
3. TraceAttack + TR_vecEndPos ?
4. TE_BLOODSPRITE ? TE_BLOODSTREAM ?
5. TE_BLOODSPRITE ? TE_BLOODSTREAM ?
6. Don't understand.
7. Don't understand.

Hope this time you will able to say at least a "Thank you" for people who try to help you.

Exolent[jNr] 01-25-2009 13:46

Re: Bullet decals
 
6 & 7. He wants to know how to hook/create the shell of the bullet falling out of the weapon.
Such as when you shoot a shotgun, the shell pops out of the side and falls to the ground.

P34nut 01-25-2009 13:50

Re: Bullet decals
 
about 6 and 7 I believe that the shell is build in the model

Dores 01-25-2009 15:03

Re: Bullet decals
 
Quote:

Originally Posted by P34nut (Post 749982)
about 6 and 7 I believe that the shell is build in the model

I think so too.

ConnorMcLeod 01-25-2009 15:34

Re: Bullet decals
 
The shell model index is handled by a weapon offset (m_iShell ?)

MPNumB 01-25-2009 15:49

Re: Bullet decals
 
1 Attachment(s)
1. But how can I set in what direction sparks will go?
2. Thanks. But:
PHP Code:

write_byte(texture index of precached decal texture name

What is this?
3. Shootgun?
4. Thanks.
5. Thanks.
6. Image.
7. Image.

Dores 01-25-2009 16:33

Re: Bullet decals
 
Quote:

Originally Posted by MPNumB (Post 750071)
6. Image.
7. Image.

I think that you need to hook a touch event of that entity.

MPNumB 01-25-2009 16:40

Re: Bullet decals
 
1 Attachment(s)
Quote:

Originally Posted by Dores (Post 750093)
I think that you need to hook a touch event of that entity.

It is not anentity - it's an message, so it's impossible to hook touch event of it.

marcellus 01-25-2009 17:28

Re: Bullet decals
 
Quote:

Originally Posted by MPNumB (Post 750097)
It is not anentity - it's an message, so it's impossible to hook touch event of it.

are u talking about this ?

Code:

// eject a shell from the weapon every shot
public eject_brass(Float: vecOrigin[3],Float:  vecVelocity[3],Float: rotation, soundtype )
{
        engfunc(EngFunc_MessageBegin, MSG_BROADCAST, SVC_TEMPENTITY, vecOrigin, 0);
        write_byte( TE_MODEL);
        engfunc(EngFunc_WriteCoord, vecOrigin[0]);
        engfunc(EngFunc_WriteCoord, vecOrigin[1]);
        engfunc(EngFunc_WriteCoord, vecOrigin[2]);
        engfunc(EngFunc_WriteCoord, vecVelocity[0]);
        engfunc(EngFunc_WriteCoord, vecVelocity[1]);
        engfunc(EngFunc_WriteCoord, vecVelocity[2]);
        engfunc(EngFunc_WriteAngle, rotation);
        write_short( g_shell);
        write_byte( soundtype);
        write_byte ( 25 );
        message_end();
}



All times are GMT -4. The time now is 20:55.

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