Raised This Month: $44 Target: $400
 11% 

[Solved] How to make this darkness effect?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Guren
Senior Member
Join Date: Feb 2011
Location: Equestria, Ponyville
Old 11-23-2012 , 12:48   [Solved] How to make this darkness effect?
Reply With Quote #1

http://youtu.be/U5T8hAJh8Zc?t=8m19s

i have find many ways. (SetLightStyle, Fog..)

but i still can't make this effect. how to make this darkness effect?
__________________

Nick : Chamamyungsu // Korean Brony

Last edited by Guren; 11-28-2012 at 09:10. Reason: Problem Solved
Guren is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 11-23-2012 , 19:04   Re: How to make this darkness effect?
Reply With Quote #2

That definitely looks like fog.
__________________
asherkin is offline
Guren
Senior Member
Join Date: Feb 2011
Location: Equestria, Ponyville
Old 11-24-2012 , 02:39   Re: How to make this darkness effect?
Reply With Quote #3

Quote:
Originally Posted by asherkin View Post
That definitely looks like fog.

i tried spawned fog but nothing happens.

Code:
public Darkness(client, Float:Time)
{
	new Float:clientposition[3];
	GetClientAbsOrigin(client, clientposition);
	new Ambient = CreateEntityByName("env_fog_controller");
	if(IsValidEntity(Ambient))
	{
		new String:positionstring[128], String:colorstring[128];
		
		Format(positionstring, 128, "%f %f %f", clientposition[0], clientposition[1], clientposition[2]);

		Format(colorstring, 128, "%d %d %d %d", 255, 255, 255, 255);

		DispatchKeyValue(Ambient, "Origin", positionstring);
		DispatchKeyValue(Ambient, "fogcolor", "0 0 0");
		DispatchKeyValue(Ambient, "fogcolor2", "0 0 0");
		DispatchKeyValue(Ambient, "fogenable", "1");
		DispatchKeyValueFloat(Ambient,"fogstart", 300.0);
		DispatchKeyValueFloat(Ambient,"fogend", 10000.0);
		DispatchKeyValueFloat(Ambient,"fogmaxdensity", 1.0);
		DispatchKeyValueFloat(Ambient, "fogblend", 10.0);
		DispatchKeyValue(Ambient, "foglerptime", "10");
		DispatchKeyValue(Ambient, "farz", "-1");
		DispatchSpawn(Ambient);

		TeleportEntity(Ambient, clientposition, NULL_VECTOR, NULL_VECTOR);
		SetVariantString("!activator");
		AcceptEntityInput(Ambient, "SetParent", client);
		ActivateEntity(Ambient);

		CreateTimer(Time, Timer_DeleteParticle, Ambient);
	}
}
__________________

Nick : Chamamyungsu // Korean Brony
Guren is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 11-24-2012 , 05:06   Re: How to make this darkness effect?
Reply With Quote #4

Quote:
Originally Posted by Guren View Post
Code:
public Darkness(client, Float:Time)
{
	new Float:clientposition[3];
	GetClientAbsOrigin(client, clientposition);
	new Ambient = CreateEntityByName("env_fog_controller");
	if(IsValidEntity(Ambient))
	{
		new String:positionstring[128], String:colorstring[128];
		
		Format(positionstring, 128, "%f %f %f", clientposition[0], clientposition[1], clientposition[2]);

		Format(colorstring, 128, "%d %d %d %d", 255, 255, 255, 255);

		DispatchKeyValue(Ambient, "Origin", positionstring);
		DispatchKeyValue(Ambient, "fogcolor", "0 0 0");
		DispatchKeyValue(Ambient, "fogcolor2", "0 0 0");
		DispatchKeyValue(Ambient, "fogenable", "1");
		DispatchKeyValueFloat(Ambient,"fogstart", 300.0);
		DispatchKeyValueFloat(Ambient,"fogend", 10000.0);
		DispatchKeyValueFloat(Ambient,"fogmaxdensity", 1.0);
		DispatchKeyValueFloat(Ambient, "fogblend", 10.0);
		DispatchKeyValue(Ambient, "foglerptime", "10");
		DispatchKeyValue(Ambient, "farz", "-1");
		DispatchSpawn(Ambient);

		TeleportEntity(Ambient, clientposition, NULL_VECTOR, NULL_VECTOR);
		SetVariantString("!activator");
		AcceptEntityInput(Ambient, "SetParent", client);
		ActivateEntity(Ambient);

		CreateTimer(Time, Timer_DeleteParticle, Ambient);
	}
}
why? (highlighted parts)
Leonardo is offline
Guren
Senior Member
Join Date: Feb 2011
Location: Equestria, Ponyville
Old 11-24-2012 , 05:24   Re: How to make this darkness effect?
Reply With Quote #5

Quote:
Originally Posted by Leonardo View Post
why? (highlighted parts)
because fog should follow player..
__________________

Nick : Chamamyungsu // Korean Brony
Guren is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 11-24-2012 , 05:54   Re: How to make this darkness effect?
Reply With Quote #6

no, it's not
and what the value of Time?

Last edited by Leonardo; 11-24-2012 at 07:47.
Leonardo is offline
Guren
Senior Member
Join Date: Feb 2011
Location: Equestria, Ponyville
Old 11-24-2012 , 06:56   Re: How to make this darkness effect?
Reply With Quote #7

Quote:
Originally Posted by Leonardo View Post
no, it's not
and what the value of [code="#FF0000"]Time[/color]?
KillTimer For Darkness (fog) effect.
__________________

Nick : Chamamyungsu // Korean Brony
Guren is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 11-24-2012 , 07:50   Re: How to make this darkness effect?
Reply With Quote #8

I mean
what amout of time
__________________
Leonardo is offline
Guren
Senior Member
Join Date: Feb 2011
Location: Equestria, Ponyville
Old 11-24-2012 , 08:00   Re: How to make this darkness effect?
Reply With Quote #9

Quote:
Originally Posted by Leonardo View Post
I mean
what amout of time
ahah

10 seconds
__________________

Nick : Chamamyungsu // Korean Brony
Guren is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 11-24-2012 , 08:11   Re: How to make this darkness effect?
Reply With Quote #10

and it is working for 10 seconds?
or not working at all? if so, try add AcceptEntityInput(Ambient,"TurnOn");
Leonardo is offline
Reply


Thread Tools
Display Modes

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 15:08.


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