AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [HELP] Change Duration of Smoke (https://forums.alliedmods.net/showthread.php?t=328252)

hellmonja 11-02-2020 00:13

[HELP] Change Duration of Smoke
 
Greetings! How's everyone doing these days?

Anyway getting right into it. Is it possible to shorten the smoke's life from a smoke grenade? I've searched high and low for this,and tried different keywords. There was one thread that asked exactly the same but it was unanswered...

EDIT:
PHP Code:

set_pev(iEntitypev_nextthinkget_gametime() + 3.0); 

I saw this code that might be able to remove the smoke faster. But I don't know how to get smoke entity itself, or if the smoke is even an entity...

HamletEagle 11-02-2020 00:37

Re: [HELP] Change Duration of Smoke
 
The smoke is created using a message(TE_SMOKE or something, can't check rn). You have to block the original message and send your own. This way you can customize the duration.

hellmonja 11-02-2020 09:32

Re: [HELP] Change Duration of Smoke
 
Will try that. It just occurred to me to look into the Colored Smokes plugin. There it uses TE_FIREFIELD. I'll try that first then TE_SMOKE if it doesn't work. I also found out if I remove the grenade world model the explosion doesn't happen. That's one way to block it I guess. Thank you for replying...

HamletEagle 11-02-2020 10:44

Re: [HELP] Change Duration of Smoke
 
Quote:

Originally Posted by hellmonja (Post 2723454)
Will try that. It just occurred to me to look into the Colored Smokes plugin. There it uses TE_FIREFIELD. I'll try that first then TE_SMOKE if it doesn't work. I also found out if I remove the grenade world model the explosion doesn't happen. That's one way to block it I guess. Thank you for replying...

Just to clear things up, you are not removing the world model, you are removing the grenade entity which has the w_ model. And if the entity is gone then it can't explode.


All times are GMT -4. The time now is 13:06.

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