Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-10-24 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
January 24, 2013, 07:07:34 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Particle Effect List  (Read 1804 times)
Revan
Sr. Member
****
Posts: 346



View Profile
« on: August 20, 2011, 05:18:54 AM »

As we have probably already noticed: every orangebox game supports the particle system... here are some links - may be helpfully :p

CSS Particles :
http://developer.valvesoftware.com/wiki/List_of_CSS_Particles

TF2 Particles :
http://developer.valvesoftware.com/wiki/List_of_TF2_Particles

L4D2 Particles :
http://developer.valvesoftware.com/wiki/List_of_L4D2_Particles
Logged

#war3source
Vulpone
Full Member
***
Posts: 141



View Profile Email
« Reply #1 on: August 20, 2011, 05:25:29 AM »

As we have probably already noticed: every orangebox game supports the particle system... here are some links - may be helpfully :p

CSS Particles :
http://developer.valvesoftware.com/wiki/List_of_CSS_Particles

TF2 Particles :
http://developer.valvesoftware.com/wiki/List_of_TF2_Particles

L4D2 Particles :
http://developer.valvesoftware.com/wiki/List_of_L4D2_Particles

Thanks a bunch, bro!
Much appreciated!
Logged

Sapere aude!
Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #2 on: August 20, 2011, 07:08:49 AM »

http://ownageclan.com/mlp/Rainbow%20Dash/omgomgomg.mp3
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #3 on: August 20, 2011, 10:03:55 AM »

Start up any source game with -tools

Switch to the particle editor tab

find a particle you like

Use my War3Source_Effects include

Huh

pretty races
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #4 on: August 20, 2011, 10:26:06 AM »

Logged

DarkEnergy
zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #5 on: August 22, 2011, 09:09:16 PM »

Start up any source game with -tools

Switch to the particle editor tab

find a particle you like

Use my War3Source_Effects include

Huh

pretty races

Any examples of how to use War3Source_Effects that you could link?

Edit: NVM I read the native now and it is easier than I thought. My brain could not previously believe that it could be this easy to have cool effects. I will now half to play though the effect list in cs:s!
« Last Edit: August 22, 2011, 09:12:08 PM by zero » Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #6 on: August 23, 2011, 09:51:40 AM »

Here's some real life code from my l4d races to illustrate how easy it is Tongue.

Spawns a ammo pile that lasts for some time, emits light around it and attaches a particle to make sure people don't miss it. (The trace function just gets the location the player aimed at)

Code:
public OnMapStart()
{
War3_PrecacheParticle(PARTICLE_AMMOPILE);
War3_PrecacheParticle(PARTICLE_LAUNCHER);
}

public OnUltimateCommand(client,race,bool:pressed)
{
if(ValidPlayer(client, true) &&
   race == thisRaceID &&
   pressed &&
   War3_SkillNotInCooldown(client, thisRaceID, ULTIMATE_AMMOSHARER, true) &&
   !Silenced(client) &&
   GetClientTeam(client) == TEAM_SURVIVORS &&
   !War3_L4D_IsHelpless(client) &&
   !War3_IsPlayerIncapped(client))
{
new skill = War3_GetSkillLevel(client, thisRaceID, ULTIMATE_AMMOSHARER);
if (skill > 0)
{
new Float:location[3];
if (!Misc_TraceClientViewToLocation(client, location)) {
GetClientAbsOrigin(client, location);
}

Do_CreateEntity("weapon_ammo_spawn", location);
ThrowAwayLightEmitter(location, "255 250 90 255", "5", 110.0, 20.0);

location[2] += 7;
ThrowAwayParticle(PARTICLE_AMMOPILE, location, 20.0);

War3_CooldownMGR(client, ULT_COOLDOWN, thisRaceID, ULTIMATE_AMMOSHARER);
}
}
}

Do_CreateEntity(const String:name[], Float:location[3]) {
new entity = CreateEntityByName(name);

DispatchSpawn(entity);
ActivateEntity(entity);
TeleportEntity(entity, location, NULL_VECTOR, NULL_VECTOR);

SetVariantString("OnUser1 !self:Kill::20.0:-1");
AcceptEntityInput(entity, "AddOutput");
AcceptEntityInput(entity, "FireUser1");
}

This attaches a green light to a players eyes. Run on spawn, race change, skill level change etc. Looks like this

Code:
checkLightEffect(client)
{
if(ValidPlayer(client, true) && War3_GetRace(client) == thisRaceID && GetClientTeam(client) == TEAM_SURVIVORS)
{
new skill = War3_GetSkillLevel(client, thisRaceID, SKILL_RADIATION);
if (skill > 0 )
{
decl String:className[64];
if(IsValidEdict(g_iRadiationLight[client]))
GetEdictClassname(g_iRadiationLight[client], className, sizeof(className));

if(!StrEqual(className, "light_dynamic"))
{
g_iRadiationLight[client] = AttachLight(client, NULL_VECTOR, "0 255 0 255", "5", 80.0, "eyes");

SetVariantString("OnUser1 !self:Distance:120:0.1:-1");
AcceptEntityInput(g_iRadiationLight[client], "AddOutput");
AcceptEntityInput(g_iRadiationLight[client], "FireUser1");
}
}
else
{
KillLightEntity(client);
}
}
}

And this is some throwaway ultimate particle

Code:
public OnUltimateCommand(client,race,bool:pressed)
{
if(ValidPlayer(client, true) &&
   race == thisRaceID &&
   pressed &&
   War3_SkillNotInCooldown(client, thisRaceID, ULT_FIREWAVE, true) &&
   !Silenced(client) &&
   GetClientTeam(client) == TEAM_SURVIVORS &&
   !War3_L4D_IsHelpless(client) &&
   !War3_IsPlayerIncapped(client))
{
    new skill = War3_GetSkillLevel(client, thisRaceID, ULT_FIREWAVE);
    if (skill > 0)
    {
new entity = -1;
new Float:VictimPosition[3];
new Float:CasterPosition[3];
decl String:ModelName[128];
//GetClientAbsOrigin(client, CasterPosition);
GetClientEyePosition(client, CasterPosition);

[...] // find entitys, hurt them etc

EmitSoundToAll(UltimateSnd, client);

decl Float:fPos[3];

GetEntPropVector(client, Prop_Send, "m_vecOrigin", fPos);
fPos[2] += 50.0;

ThrowAwayParticle("gas_explosion_pump", fPos, 2.5);
ThrowAwayLightEmitter(fPos, "225 30 0 255", "5", 800.0, 0.4);

War3_CooldownMGR(client, ULT_COOLDOWN, thisRaceID, ULT_FIREWAVE);
    }
    }
}

As you can see, I provided some easy one liners to fit 90% of your effect needs. Some cases still need some manual work though (Like changing the distance for the green light example ;>).
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #7 on: August 23, 2011, 09:59:14 AM »

doesnt war3 have a stock get aim vec?
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #8 on: August 23, 2011, 10:14:52 AM »

Quick search brought up War3_GetAimEndPoint. While I have most of the API in my head by now I still don't know everything (and I so rarely use traces :x)
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #9 on: August 23, 2011, 10:19:05 AM »

is it possible to create a particle, time it for kill after 2.0 seconds, but remove it early at 1.0 seconds?
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #10 on: August 23, 2011, 10:25:57 AM »

Quote
is it possible to create a particle, time it for kill after 2.0 seconds, but remove it early at 1.0 seconds?

Yes. AcceptEntityInput(entityIndex, "kill");. All the killing of particles is handled internally by the source engine and it doesn't mind if you remove them early.

Also gonna throw in some more knowledge (should prolly rewrite all the info from this thread in the tutorial section but meh... i lazy)

Getting a models attachment points:

I'll illustrate this using L4D2.
* Download the SDK/Authoring tools for your game.
* Open it and select "Model Viewer" (Step1)
* Open up a player model you want to find the attachments for. You will find the tab "Attachments" there (Step2)
* Now just find a good attachment spot and use that for SetParentAttachment. My ModifyEntityAttach stock takes an optional attachment name to attach the given entity to that point. (Step3)

You can attach any entity to attachment points. You could even spawn a prop, make it noclip (children always nocollide with parents, but you don't want to block other people) and give it a crowbar model and attach it to the weapon hand to make it seem like the player is swinging a crowbar when attacking with the knife or stuff like that.
« Last Edit: August 23, 2011, 03:37:20 PM by Glider⠠⠵ » Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #11 on: August 23, 2011, 10:26:52 AM »

assuming EntIndexToEntRef is completely safe, i just have to store the particle index to ref, then later deref where sm will check for its signature, then i kill it
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #12 on: August 23, 2011, 10:29:13 AM »

Yes, EntIndexToEntRef is completly safe. Use that if you want to pass the entity id around safely (I haven't done so in any of my plugins to date since I just read about it recently)
Logged

Ownz
Developer
Administrator
Hero Member
*****
Posts: 2169



View Profile WWW
« Reply #13 on: August 23, 2011, 10:32:50 AM »

yup for entities. but clients its fine to pass clients in timers as ValidPlayer does the check
Logged

DarkEnergy
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #14 on: August 23, 2011, 10:38:25 AM »

The voteban example is pretty good though. What if I make a race that blows up the client you're looking at after 120 seconds. You use it on a player, he disconnects and a new player connects with the same index.

Wink
Logged

nvn
Full Member
***
Posts: 133


View Profile
« Reply #15 on: November 16, 2011, 01:11:23 PM »


You can attach any entity to attachment points.

What about attaching burning_character(_a-e), i cant get it working with your stocks:) It just spawns at NULL_VECTOR, but others, from //FIRE_01.PCF , working fine...
Logged

zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #16 on: November 20, 2011, 01:14:52 AM »

Where are you finding the list of methods you can call these particles in?

For example you use the AttachLight method but where can I view the natives for these so I can see the full options and all the methods that I can use to assign particles?

Sorry I am really new to this sort of programing in SM  Huh
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #17 on: November 20, 2011, 07:00:49 AM »

@zero

What do you mean? The full source code is in the include o.o

@nvn

Check if the particle has some weird starting point. Not all of them start out at the center, but have big offsets. Also maybe its set as an instant effect so it just vanishes instead of repeating...
Logged

zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #18 on: November 20, 2011, 03:15:22 PM »

Just for reference is it possible to open non player models and attach things to them? For example we could spawn an entity which is a model and then attach a particle effect to part of that model.
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #19 on: November 20, 2011, 05:20:01 PM »

yes
Logged

zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #20 on: November 21, 2011, 10:13:34 PM »

When I place -tools in the launch options it does nothing.
When I try to start the model viewer the model viewer crashes.

I have tried reinstalling the SDK and it still does the same thing.
Logged

Vulpone
Full Member
***
Posts: 141



View Profile Email
« Reply #21 on: November 22, 2011, 01:03:16 AM »

When I place -tools in the launch options it does nothing.
When I try to start the model viewer the model viewer crashes.

I have tried reinstalling the SDK and it still does the same thing.

The Model Viewer seems screwed up. Same happened to be last few times. It works now,though. If you're on Win7, open it with Admin privileges. If that does not work, try running it in Compatibility Mode with Win XP SP 2 or 3. If that does not work, I know no other option. :-D
Logged

Sapere aude!
zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #22 on: November 23, 2011, 11:28:43 PM »

Still can not get model viewer to start. The bigger issue is that css will not do anything if I put -tools in the parameters. Things like no sound work but not -tools...
Logged

zero
Full Member
***
Posts: 191



View Profile WWW Email
« Reply #23 on: November 24, 2011, 12:30:18 AM »

Can anyone give me a list of the attachment points for a css player model? I am not able to open the model viewer. I was able to start hl2ep2 with -tools and then open the particle effects from css using that.

So if I could please get a full list of the attachment points I can figure out the rest from there and just test each point one at a time.

Thanks   Wink
Logged

Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 454


⠠⠵


View Profile
« Reply #24 on: November 24, 2011, 02:51:28 PM »

How about fixing your installation so you can do it yourself?
Logged

Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!