The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help ParticleSystem not disappearing
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#1
ParticleSystem not disappearing

I have this little problem in my "Insanity Event"-thingy. When you enter an area alot of particle system become active and a chase moment occurs. It's just that if the person dies the particlesystems are still active ruining the entire thing.

SCRIPT:

Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "Trigger_Area_1", "Event_trigger1", false, 0);
SetEntityPlayerInteractCallback("diary_paper01_1", "Interact1", true);
}

void Interact1(string &in asEntity)
{
SetEntityActive("Trigger_Area_1", true);
CheckPoint ("One", "PlayerStartArea_2", "Reset_1", "", "");

}

void Event_trigger1(string &in asParent , string &in asChild , int alState)
{
AddTimer("Explo1", 3.0f, "Guardian_Spawn");
AddTimer("Explo2", 5.0f, "Guardian_Spawn");
AddTimer("Explo3", 10.0f, "Guardian_Spawn");
AddTimer("Explo4", 14.0f, "Guardian_Spawn");
AddTimer("Explo5", 18.0f, "Guardian_Spawn");
AddTimer("Explo6", 22.0f, "Guardian_Spawn");
}

void Guardian_Spawn(string &in asTimer)
{
if(asTimer == "Explo1"){
CreateParticleSystemAtEntity("", "ps_acid_web_dissolve.ps", "Particle_area_1", false);
PlaySoundAtEntity("", "guardian_distant.snt", "Death_Area_3", 1, false);
FadeSepiaColorTo(2.0f, 6.0f);
SetMessage("Descriptions", "Hint_4", 3.0f);

}
if(asTimer == "Explo2"){
PlayMusic("14_elevator_falls.ogg", true, 4.0f, 0, 0, true);
PlaySoundAtEntity("", ".snt", "", 1, false);
SetEntityActive("Death_Area_1", true);
SetEntityActive("Trigger_Area_1", false);
CreateParticleSystemAtEntity("ps1", "ps_guardian_appear_explosion.ps", "Explosion_Area_1", false);
CreateParticleSystemAtEntity("ps2", "ps_guardian_appear_explosion.ps", "Explosion_Area_2", false);
CreateParticleSystemAtEntity("ps3", "ps_guardian_appear_explosion.ps", "Explosion_Area_4", false);

}
if(asTimer == "Explo3"){
PlaySoundAtEntity("", ".snt", "", 1, false);
SetEntityActive("Death_Area_2", true);
CreateParticleSystemAtEntity("ps4", "ps_guardian_danger_fog_loop.ps", "Particle_area_1", false);
CreateParticleSystemAtEntity("ps5", "ps_guardian_danger_fog_loop.ps", "Particle_area_2", false);
CreateParticleSystemAtEntity("ps6", "ps_guardian_danger_fog_loop.ps", "Particle_area_3", false);

CreateParticleSystemAtEntity("ps7", "ps_guardian_appear_explosion.ps", "Explosion_Area_3", false);
CreateParticleSystemAtEntity("ps8", "ps_guardian_appear_explosion.ps", "Explosion_Area_5", false);
CreateParticleSystemAtEntity("ps9", "ps_guardian_appear_explosion.ps", "Explosion_Area_9", false);

}
if(asTimer == "Explo4"){
PlaySoundAtEntity("", ".snt", "", 1, false);
SetEntityActive("Death_Area_3", true);
CreateParticleSystemAtEntity("ps10", "ps_guardian_danger_fog_loop.ps", "Particle_area_4", false);
CreateParticleSystemAtEntity("ps11", "ps_guardian_danger_fog_loop.ps", "Particle_area_5", false);

CreateParticleSystemAtEntity("ps12", "ps_guardian_appear_explosion.ps", "Explosion_Area_6", false);
CreateParticleSystemAtEntity("ps13", "ps_guardian_appear_explosion.ps", "Explosion_Area_7", false);
CreateParticleSystemAtEntity("ps14", "ps_guardian_appear_explosion.ps", "Explosion_Area_8", false);

}
if(asTimer == "Explo5"){
PlaySoundAtEntity("", ".snt", "", 1, false);
SetEntityActive("Death_Area_4", true);
CreateParticleSystemAtEntity("ps15", "ps_guardian_danger_fog_loop.ps", "Particle_area_6", false);
CreateParticleSystemAtEntity("ps16", "ps_guardian_danger_fog_loop.ps", "Particle_area_7", false);

CreateParticleSystemAtEntity("ps17", "ps_guardian_appear_explosion.ps", "Explosion_Area_11", false);
CreateParticleSystemAtEntity("ps18", "ps_guardian_appear_explosion.ps", "Explosion_Area_12", false);

}
if(asTimer == "Explo6"){
PlaySoundAtEntity("", ".snt", "", 1, false);
SetEntityActive("Death_Area_5", true);
CreateParticleSystemAtEntity("ps19", "ps_guardian_appear_explosion.ps", "Explosion_Area_10", false);
CreateParticleSystemAtEntity("ps20", "ps_guardian_danger_fog_loop.ps", "Particle_area_8", false);

}
}

void Reset_1(string &in asName, int alCount)
{
ResetProp("Trigger_Area_1");
ResetProp("Death_Area_1");
ResetProp("Death_Area_2");
ResetProp("Death_Area_3");
ResetProp("Death_Area_4");
ResetProp("Death_Area_5");
SetEntityActive("Trigger_Area_1", true);
DestroyParticleSystem("ps1");
DestroyParticleSystem("ps2");
DestroyParticleSystem("ps3");
DestroyParticleSystem("ps4");
DestroyParticleSystem("ps5");
DestroyParticleSystem("ps6");
DestroyParticleSystem("ps7");
DestroyParticleSystem("ps8");
DestroyParticleSystem("ps9");
DestroyParticleSystem("ps10");
DestroyParticleSystem("ps11");
DestroyParticleSystem("ps12");
DestroyParticleSystem("ps13");
DestroyParticleSystem("ps14");
DestroyParticleSystem("ps15");
DestroyParticleSystem("ps16");
DestroyParticleSystem("ps17");
DestroyParticleSystem("ps18");
DestroyParticleSystem("ps19");
DestroyParticleSystem("ps20");

}



"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 05-10-2012, 04:08 PM by i3670.)
05-10-2012, 12:41 PM
Find


Messages In This Thread
ParticleSystem not disappearing - by i3670 - 05-10-2012, 12:41 PM
RE: ParticleSystem not disappearing - by i3670 - 05-10-2012, 04:08 PM
RE: ParticleSystem not disappearing - by i3670 - 05-10-2012, 04:40 PM
RE: ParticleSystem not disappearing - by i3670 - 05-13-2012, 12:17 AM
RE: ParticleSystem not disappearing - by i3670 - 05-13-2012, 11:13 AM



Users browsing this thread: 3 Guest(s)