AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Generate Smoke Effect Lasting 30s? (https://forums.alliedmods.net/showthread.php?t=105540)

simoneaolson 10-05-2009 16:44

Generate Smoke Effect Lasting 30s?
 
Trying to emulate a smoke grenade in DoD:S on Round win, however i can't get it to do anything.

I have tried TE_SetupSmoke() but the function only displayed smoke for a couple frames then went away very quickly

my code so far:

Code:


//smokeModel = PrecacheModel("materials/models/weapons/w_models/smoke_us/w_smoke_us.vmt")
//tpos == position on map to display smoke

SmokeEffect(tPos, smokeModel, 60.0, 60, 30.0)

public Action:SmokeEffect(Float:pos[3], Model, Float:Scale, FrameRate, Float:Life)
{
    TE_Start("Smoke");
    TE_WriteVector("m_vecOrigin", pos);
    TE_WriteNum("m_nModelIndex", Model);
    TE_WriteFloat("m_fScale", Scale);
    TE_WriteNum("m_nFrameRate", FrameRate);
    TE_WriteFloat("m_fLife", Life)
    TE_SendToAll()
}


retsam 10-05-2009 19:39

Re: Generate Smoke Effect Lasting 30s?
 
Ya TE's you gotta repeat by using a repeating timer, or itll only be displayed once as far as I know.


All times are GMT -4. The time now is 18:19.

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