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 Particle Effects help
Smackdown Offline
Junior Member

Posts: 13
Threads: 3
Joined: Jan 2013
Reputation: 0
#5
RE: Particle Effects help

No error. It just plays the sound when I'm on the Scriptarea4. But my target is, that it activates the particle effect too when I pass this area.

My hps so far (im a noob in scripting and such things Big Grin)

Quote:void OnStart()
{
AddUseItemCallback("", "key_torture_chamber_1", "castle_arched01_1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "ScriptArea_1", "schweine", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_2", "schweinehang", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_3", "klang", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_4", "staub", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_5", "engel", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_6", "falle", true, 1);
AddEntityCollideCallback("Player", "ScriptArea_7", "enemyklang", true, 1);
AddEntityCollideCallback("Player" , "ScriptArea_8" , "wegpunkte" , true , 1);
AddEntityCollideCallback("Player", "ScriptArea_9", "klang2", true, 1);
AddUseItemCallback("", "key_torture_chamber_2", "mansion_1", "UsedKeyOnDoor2", true);
}







void UsedKeyOnDoor2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, false);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0, false);
RemoveItem("key_torture_chamber_2");
AddDebugMessage("KeyOnDoor", false);
}









void klang2(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_human_noices.snt", "Player", 0, false);



}









void wegpunkte(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_7", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_10", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_11", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_12", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_13", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_14", 0, "Idle");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_15", 0, "Idle");
}












void enemyklang(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "amb_idle_scratch.snt", "Player", 0, false);



}








void falle(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "lurker_hit_wood.snt", "Player", 0, false);
SetEntityActive("armour_nice_complete_1", true);
SetEntityActive("armour_nice_complete_2", true);


}



void engel(string &in asParent, string &in asChild, int alState)
{
StartPlayerLookAt("angel_statue_1", 15, 15, "");
PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false);
SetEntityActive("angel_statue_1", true);
GiveSanityDamage(2.0f, true);
AddTimer("opala",0.2f,"EnemyTimer");

}











void staub(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "28_done03.snt", "Player", 0, false);
SetEntityActive("ParticleSystem_17", true);
SetEntityActive("ParticleSystem_19", true);

}









void klang(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_baby_cry.snt", "Player", 0, false);

}











void schweinehang(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_breath_slow.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("pig_corpse_hanging_1", true);
SetEntityActive("pig_corpse_hanging_2", true);
SetEntityActive("carcass_1", true);
SetEntityActive("carcass_2", true);
SetEntityActive("pig_corpse_hanging_3", true);
SetEntityActive("pig_corpse_hanging_4", true);
SetEntityActive("pig_corpse_hanging_5", true);
SetEntityActive("pig_corpse_hanging_6", true);
SetEntityActive("carcass_3", true);
SetEntityActive("ParticleSystem_34", true);

}




void schweine(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "scare_animal_squeal.snt", "Player", 0, false);
GiveSanityDamage(5.0f, true);
SetEntityActive("pig_corpse_26", true);
SetEntityActive("pig_corpse_27", true);
SetEntityActive("pig_corpse_28", true);
SetEntityActive("pig_corpse_29", true);
}










void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("castle_arched01_1", false, false);
PlaySoundAtEntity("", "unlock_door.snt", "castle_arched01_1", 0, false);
RemoveItem("key_torture_chamber_1");
AddDebugMessage("KeyOnDoor", false);
}




////Timers
void EnemyTimer(string &in asTimer)

{

if(asTimer == "opala")
{
StopPlayerLookAt();
AddTimer("Scare2",30.5f,"EnemyTimer");
}
}
01-03-2013, 08:10 PM
Find


Messages In This Thread
Particle Effects help - by Smackdown - 01-03-2013, 07:24 PM
RE: Particle Effects help - by Statyk - 01-03-2013, 07:38 PM
RE: Particle Effects help - by Smackdown - 01-03-2013, 07:46 PM
RE: Particle Effects help - by Statyk - 01-03-2013, 07:56 PM
RE: Particle Effects help - by Smackdown - 01-03-2013, 08:10 PM
RE: Particle Effects help - by Statyk - 01-03-2013, 08:22 PM
RE: Particle Effects help - by Smackdown - 01-03-2013, 08:26 PM
RE: Particle Effects help - by Statyk - 01-03-2013, 08:43 PM
RE: Particle Effects help - by Smackdown - 01-03-2013, 08:57 PM
RE: Particle Effects help - by Statyk - 01-03-2013, 09:36 PM
RE: Particle Effects help - by Smackdown - 01-03-2013, 09:55 PM
RE: Particle Effects help - by NaxEla - 01-04-2013, 12:21 AM
RE: Particle Effects help - by Smackdown - 01-04-2013, 11:42 AM



Users browsing this thread: 3 Guest(s)