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


