Raised This Month: $32 Target: $400
 8% 

Falling Smoke


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-27-2011 , 16:33   Falling Smoke
Reply With Quote #1

I want to try to make smoke that falls instead of rising. I also want to try to parent it to a player.

I am able to make the smoke:

Code:
new String:gas_name[128];
    Format(gas_name, sizeof(gas_name), "SpawnGas%i", client);
    new String:originData[64];
    Format(originData, sizeof(originData), "%f %f %f", VectorPos[0], VectorPos[1], VectorPos[2]);
    new String:colorData[64];
    Format(colorData, sizeof(colorData), "%i %i %i", 220, 100, 110);
    new gascloud = CreateEntityByName("env_smokestack");
    DispatchKeyValue(gascloud,"targetname", gas_name);
    DispatchKeyValueVector(gascloud,"Origin", VectorPos);
    DispatchKeyValueFloat(gascloud,"BaseSpread", 15.0);
    DispatchKeyValue(gascloud,"SpreadSpeed", "100");
    DispatchKeyValue(gascloud,"Speed", "50");
    DispatchKeyValueFloat(gascloud,"StartSize", 15.0);
    DispatchKeyValueFloat(gascloud,"EndSize", 25.0);
    DispatchKeyValue(gascloud,"Rate", "200");
    DispatchKeyValue(gascloud,"JetLength", "500");
    DispatchKeyValueFloat(gascloud,"Twist", 5.0);
    DispatchKeyValue(gascloud,"RenderColor", colorData);
    DispatchKeyValue(gascloud,"RenderAmt", "100");
    DispatchKeyValue(gascloud,"SmokeMaterial", "particle/fire.vmt");
    DispatchSpawn(gascloud);
    TeleportEntity(gascloud, VectorPos, NULL_VECTOR, NULL_VECTOR);
    AcceptEntityInput(gascloud, "TurnOn");
However when it comes to parenting the smoke or making it go a different direction I am lost. Here is the valve page for the entity: https://developer.valvesoftware.com/wiki/Env_smokestack

Can I get some help please? My main issue is getting it to go down instead of up.

Thanks!
__________________
zeroibis is offline
strontiumdog
Veteran Member
Join Date: Jan 2007
Location: BC, Canada
Old 11-28-2011 , 00:16   Re: Falling Smoke
Reply With Quote #2

Try env_steam
https://developer.valvesoftware.com/wiki/Env_steam
__________________
Plugins | TheVille
Zombie Mod for DoD:S - l4dod.theville.org
strontiumdog is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-28-2011 , 00:28   Re: Falling Smoke
Reply With Quote #3

Quote:
Originally Posted by strontiumdog View Post
I do not see how that does anything differently. I see that the direction for both should be able to be controlled by modifying the Pitch Yaw Roll (Y Z X) but I do not know how to do this.
__________________
zeroibis is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 11-28-2011 , 12:10   Re: Falling Smoke
Reply With Quote #4

TeleportEntity(gascloud, VectorPos, VectorAng, NULL_VECTOR);
blodia is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-28-2011 , 13:41   Re: Falling Smoke
Reply With Quote #5

Quote:
Originally Posted by blodia View Post
TeleportEntity(gascloud, VectorPos, VectorAng, NULL_VECTOR);
Will that work when it is parented to another entity?
__________________
zeroibis is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 11-28-2011 , 14:14   Re: Falling Smoke
Reply With Quote #6

origin and angles can be changed on parented entites, the vectors are relative to the parents local space, same with m_angRotation/m_vecOrigin. if you want to change the world angles use m_angAbsRotation/m_vecAbsOrigin.
blodia is offline
zeroibis
Veteran Member
Join Date: Jun 2007
Old 11-28-2011 , 15:57   Re: Falling Smoke
Reply With Quote #7

So I assume it would look like:
Code:
SetEntPropVector(entity, Prop_Send, "m_angRotation", vec);
Then I would just mess around with vec being + or - for each of the 3 vectors until the smoke points down?

Thanks, this already makes things a bit easier to figure out!
__________________

Last edited by zeroibis; 11-28-2011 at 15:58.
zeroibis is offline
BlueRaja
Senior Member
Join Date: Nov 2004
Old 12-19-2011 , 21:31   Re: Falling Smoke
Reply With Quote #8

Code:
DispatchKeyValue(gascloud, "Angles", "180 0 0");
__________________
STEPS IN TROUBLESHOOTING <insert anything here>:
1. Narrow down the problem to a specific condition or conditions.
2. Fix it.

Last edited by BlueRaja; 12-19-2011 at 21:31.
BlueRaja is offline
Send a message via AIM to BlueRaja Send a message via MSN to BlueRaja
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 01:03.


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