Need help with particles!

Grab your favourite IDE and tinker with the innards of game engines

Need help with particles!

Postby NZNobody on Wed Jul 06, 2011 3:21 pm

Hey,
Im working on a mod that’s based of a WC3 map and needs spells, so need lots particles (i think, if you know alternates, please advise)
Anyways upto now I have created a duplicate of the crossbow and modified it to shoot 'spells', a class i created called CBaseSpell which is similar to a projectile. It will travel in a line and has a limited life time and 'destroys' upon collision.
Now the issue is the effects, atm it’s just a Roller_Spikes model flying through the air and then vanishing. I have a function CBaseSpell::Destroy that looks so:
Code: Select all
//-----------------------------------------------------------------------------
// Purpose: Should do all the dying things like explosions / effects and maybe push effects?
//-----------------------------------------------------------------------------
void CBaseSpell::Destroy( void )
{
   QAngle angOrig = QAngle(0,0,0);
   Vector vecCurPos=BaseClass::GetAbsOrigin();
   DispatchParticleEffect( "building_explosion",vecCurPos, angOrig, this);
}


And this gets called when it collides, and for debugging purposes .2 seconds before its lifetime runs out. Anyways all i get no matter what particle name i use is: unable to load particle effect, unknown effect and so on and so forth. Tried "explosion" "grenade_fx" which i know exist.

NOTE: I do precache it earlier but that also gives unknown effect

Need help as I’ve spent hours trying to fix this and just can't.

Also while we are at it what is the best way to do spells and particle effects?
Thanks in advance ;)
NZNobody
Member
Member
 
Joined: Wed Jul 06, 2011 11:25 am

Re: Need help with particles!

Postby LordDz on Wed Jul 06, 2011 3:50 pm

Pretty hard to think of alternatives when you doesn't tell us which map it is you're basing it of? :)
User avatar
LordDz
May Contain Skills
May Contain Skills
 
Joined: Mon Sep 01, 2008 12:28 pm
Location: Hammer Crash Logs

Re: Need help with particles!

Postby NZNobody on Thu Jul 07, 2011 12:01 am

Sorry, its Warlocks, a map where you have to push enemies into th lava with spells and is all about aiming. ATM my mod was created using 2007 engine as a HL2MP mod and in gaminfo.txt the appid is 218
Fixed splling, 'e' key wasn't working
NZNobody
Member
Member
 
Joined: Wed Jul 06, 2011 11:25 am

Re: Need help with particles!

Postby NZNobody on Thu Jul 07, 2011 12:32 am

Sorry, a good night’s sleep and playing around with names (what i did was extract all the source 2007 particles into my mod folder including its particles_manifest.txt file) and it works now, now I’ll try add my own particles to this. But if anyone has any suggestions on how to 'cast spells' without using active weapons but rather just hotkeys, I’d be very appreciative!
NZNobody
Member
Member
 
Joined: Wed Jul 06, 2011 11:25 am

Return to Programming

Who is online

Users browsing this forum: No registered users