I use the following code to create particles that follow the player, but the particles of the magic circle do not move in the video.
https://youtu.be/S0aRz9gZvWA
What modifications do I need to do to make it move with the player?
thanks!
PHP Code:
void ParticleFollow(char[] particleName, int client, float time)
{
if(GetClientTeam(client) == 2 && IsPlayerAlive(client))
{
int entity = CreateEntityByName("info_particle_system");
float pos[3];
DispatchKeyValue(entity, "effect_name", particleName);
GetEntPropVector(client, Prop_Send, "m_vecOrigin", pos);
TeleportEntity(entity, pos, NULL_VECTOR, NULL_VECTOR);
DispatchSpawn(entity);
SetVariantString("!activator");
AcceptEntityInput(entity, "SetParent", client);
ActivateEntity(entity);
AcceptEntityInput(entity, "Start");
CreateTimer(time, DeleteParticles, entity);
}
}