Raised This Month: $51 Target: $400
 12% 

How they make attached particles?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 04-23-2016 , 18:33   How they make attached particles?
Reply With Quote #1

Hello. I was wondering how they make attached particles to the player? https://developer.valvesoftware.com/...S_GO_Particles

https://www.youtube.com/watch?v=NzSOtWtZ7Ew
__________________

Last edited by iGANGNAM; 04-24-2016 at 03:50.
iGANGNAM is offline
ESK0
BANNED
Join Date: May 2014
Location: Czech Republic
Old 04-23-2016 , 20:53   Re: How they make attached particles?
Reply With Quote #2

It's a secret which cannot be revealed.. Or use search button to find some particles
ESK0 is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 04-24-2016 , 01:02   Re: How they make attached particles?
Reply With Quote #3

Create the particle entity, set the keyvalues, spawn it, and set the player as the parent.
thecount is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 04-24-2016 , 03:13   Re: How they make attached particles?
Reply With Quote #4

I could only assume that these particles are custom so I doubt you'd find them in the particle list. If you want to get a full particle list, start a game with "-tools" parameter in its launch options. I think that it's a bit for complicated for CS:GO, because additionally to that parameter you'll also have to type "toolload pet" in the console. I've never done it for CS:GO so I don't know the full process.

I'm pretty sure you'd need to export all particle .pcf's from the .vpk files.
Phil25 is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 04-24-2016 , 03:48   Re: How they make attached particles?
Reply With Quote #5

Quote:
Originally Posted by Phil25 View Post
I could only assume that these particles are custom so I doubt you'd find them in the particle list. If you want to get a full particle list, start a game with "-tools" parameter in its launch options. I think that it's a bit for complicated for CS:GO, because additionally to that parameter you'll also have to type "toolload pet" in the console. I've never done it for CS:GO so I don't know the full process.

I'm pretty sure you'd need to export all particle .pcf's from the .vpk files.
I have few custom .pcf files, but don't even imagine how to use them. I had tried to launch game like you said but after I open .pcf file it doesn't even react

Quote:
Originally Posted by thecount View Post
Create the particle entity, set the keyvalues, spawn it, and set the player as the parent.
which entity name is it?
__________________

Last edited by iGANGNAM; 04-24-2016 at 03:50.
iGANGNAM is offline
Phil25
AlliedModders Donor
Join Date: Feb 2015
Old 04-24-2016 , 05:36   Re: How they make attached particles?
Reply With Quote #6

Quote:
Originally Posted by iGANGNAM View Post
which entity name is it?
info_particle_system
Phil25 is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 05-01-2016 , 03:44   Re: How they make attached particles?
Reply With Quote #7

Found a snippet in https://devsapps.com:8929/sourcemod/...der_effects.sp
Code:
stock int AttachParticle(int client, char[] particleType)
{
	int particle = CreateEntityByName("info_particle_system");
	
	if(IsValidEntity(particle))
	{
		SetEntPropEnt(particle, Prop_Data, "m_hOwnerEntity", client);
		DispatchKeyValue(particle, "effect_name", particleType);
		SetVariantString("!activator");
		AcceptEntityInput(particle, "SetParent", client, particle, 0);
		SetVariantString("forward");
		AcceptEntityInput(particle, "SetParentAttachment", particle , particle, 0);
		DispatchSpawn(particle);
		
		AcceptEntityInput(particle, "start");
		ActivateEntity(particle);
		
		float pos[3];
		GetEntPropVector(particle, Prop_Send, "m_vecOrigin", pos);
		
		pos[2] += 12.0;
		float vec_start[3];
		AddInFrontOf(pos, NULL_VECTOR, 12.0, vec_start);
		TeleportEntity(particle, vec_start, NULL_VECTOR, NULL_VECTOR);
		
		return EntIndexToEntRef(particle);
	}
	return -1;
}

/***********************************************************/
/******************** IS VALID ENTITY **********************/
/***********************************************************/
stock bool IsValidEntRef(int entity)
{
	if( entity && EntRefToEntIndex(entity) != INVALID_ENT_REFERENCE )
		return true;
	return false;
}

/***********************************************************/
/********************* REMOVE ENTITY ***********************/
/***********************************************************/
void RemoveEntity(int ref)
{

	int entity = EntRefToEntIndex(ref);
	if (entity != -1)
	{
		AcceptEntityInput(entity, "Kill");
		ref = INVALID_ENT_REFERENCE;
	}
		
}

/***********************************************************/
/*************** PRECACHE PARTICLE EFFECT ******************/
/***********************************************************/
stock void PrecacheParticleEffect(const char[] sEffectName)
{
	static int table = INVALID_STRING_TABLE;
	
	if (table == INVALID_STRING_TABLE)
	{
		table = FindStringTable("ParticleEffectNames");
	}
	
	bool save = LockStringTables(false);
	AddToStringTable(table, sEffectName);
	LockStringTables(save);
}

stock void AddInFrontOf(float vecOrigin[3], float vecAngle[3], float units, float output[3])
{
	float vecAngVectors[3];
	vecAngVectors = vecAngle; //Don't change input
	GetAngleVectors(vecAngVectors, vecAngVectors, NULL_VECTOR, NULL_VECTOR);
   
	for (int i; i < 3; i++)
	{
		output[i] = vecOrigin[i] + (vecAngVectors[i] * units);
	}
}
__________________
iGANGNAM is offline
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 13:29.


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