Page 1 of 1

my code caused the error of the game

Posted: Sun Sep 06, 2015 2:39 am
by Petas
I need help with code

I am doing the last few modifications and today I failed code.

Screenshot
Image
------------------------------My Code---------------------------
///////////////////////////////////////////////////////////////////////////////
//
// Copyright 1997-2000 Pandemic Studios
//

CreateEffectType("common.class.RestoreTargetProcesslarge")
{
Sound();
Particles()
{
Add(10)
{
Particle("RestoreTargetProcesslarge.puff");
VelocityPosition(0.6, 6, 0.6);
Random(1.0, 0.5, 1.0);
RandomVertex(1);
}
}
MeshEffect("restoretargetlarge", "Glow")
{
LifeTime(0.8);
ColorKey(0.0, 0, 255, 0, 0);
ColorKey(0.5, 255, 255, 0, 127);
ColorKey(1.0, 0, 255, 0, 0);
}
}

CreateParticleType("RestoreTargetProcesslarge.puff", "Particle")
{
lifeTime(1.0);
RenderBase("RenderRestoreTargetProcesslarge.puff");
}
CreateParticleRenderType("RenderRestoreTargetProcesslarge.puff", "Sprite")
{
TextureName("lightflare.tga"); // hack
TextureBlend("srcalpha one modulatealpha");
ColorKey(0.0, 255, 255, 255, 255);
ColorKey(0.3, 255, 255, 0, 127);
ColorKey(1.0, 0, 255, 0, 0);
StartRadius(1.0);
FinishRadius(0.2);
AnimateTime(1.0);
}
}
}

Re: my code caused the error of the game

Posted: Sun Sep 06, 2015 12:44 pm
by Kennedy
Particle Type 'RestoreTargetProcesslarge.puff' Already defined
It means you have another you duplicate same file

Re: my code caused the error of the game

Posted: Sun Sep 06, 2015 1:07 pm
by Petas
well, but how can I fix ? :PB

Re: my code caused the error of the game

Posted: Sun Sep 06, 2015 5:21 pm
by Kennedy
Change names of ur files

Re: my code caused the error of the game

Posted: Sun Sep 06, 2015 5:34 pm
by TommyCD1
Find and change all instances of 'RenderRestoreTargetProcesslarge.puff' to something else. Like so:

Code: Select all

CreateParticleType("RestoreTargetProcesslarge.puff", "Particle")
{
  lifeTime(1.0);
  RenderBase("RenderRestoreTargetProcesslarge.puff");
}
CreateParticleRenderType("RenderRestoreTargetProcesslarge.puff", "Sprite")
{
  TextureName("lightflare.tga"); // hack
  TextureBlend("srcalpha one modulatealpha");
  ColorKey(0.0, 255, 255, 255, 255);
  ColorKey(0.3, 255, 255, 0, 127);
  ColorKey(1.0, 0, 255, 0, 0);
  StartRadius(1.0);
  FinishRadius(0.2);
  AnimateTime(1.0);
}

Code: Select all

CreateParticleType("RestoreTargetProcesslarge.puff2", "Particle")
{
  lifeTime(1.0);
  RenderBase("RenderRestoreTargetProcesslarge.puff2");
}
CreateParticleRenderType("RenderRestoreTargetProcesslarge.puff2", "Sprite")
{
  TextureName("lightflare.tga"); // hack
  TextureBlend("srcalpha one modulatealpha");
  ColorKey(0.0, 255, 255, 255, 255);
  ColorKey(0.3, 255, 255, 0, 127);
  ColorKey(1.0, 0, 255, 0, 0);
  StartRadius(1.0);
  FinishRadius(0.2);
  AnimateTime(1.0);
}

Re: my code caused the error of the game

Posted: Mon Sep 07, 2015 6:38 am
by Petas
thanks :D
oh no next eror
my code
Add(2)
{
Particle("VehChunk1");
VelocityPosition(5, 15, 5);
VelocityAngular(255, 255, 255);
Random(1.0, 0.5, 1.0);
}
Add(2)
{
Particle("VehChunk2");
VelocityPosition(5, 15, 5);
VelocityAngular(255, 255, 255);
Random(1.0, 0.5, 1.0);
}
Add(2)
{
Particle("VehChunk3");
VelocityPosition(5, 15, 5);
VelocityAngular(255, 255, 255);
Random(1.0, 0.5, 1.0);
}
Add(2)
{
Particle("VehChunk4");
VelocityPosition(5, 15, 5);
VelocityAngular(255, 255, 255);
Random(1.0, 0.5, 1.0);
}
Add(2)
{
Particle("VehChunk5");
VelocityPosition(5, 15, 5);
VelocityAngular(255, 255, 255);
Random(1.0, 0.5, 1.0);
}
}
}

How can I fix ? :PB :PB