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
Unused effects when getting sanity damage?
zionifl Offline
Junior Member

Posts: 25
Threads: 10
Joined: Feb 2017
Reputation: 1
#3
RE: Unused effects when getting sanity damage?

(03-19-2017, 05:19 AM)Mudbill Wrote: If you script them manually, you should easily be able to add them. The image trail already has its own script, which combined with timers should give you the effect you want. Same thing with playing the sound effect of a heart beat via script.

I already tried scripting to the effect take place before the sanity damage, but the effect cuts when the sanity damage triggers. Here is the script (It's the script from the opening door from the Old Archives) :

void CollideOpeningDustDoor(string &in asParent, string &in asChild, int alState)
{
//StopRandomLook(); //De-activate the spinning head
FadeImageTrailTo(1.5f, 2); <--- THIS IS THE IMAGE TRAIL EFFECT, GO TO THE END OF THE SCRIPT

CreateParticleSystemAtEntity("PSDoor_1", "ps_dust_paper_blow.ps", "AreaDoor_1", false);
CreateParticleSystemAtEntity("PSDoor_2", "ps_dust_push.ps", "AreaDoor_1", false);

PlaySoundAtEntity("SoundDoor_1", "scare_wind_reverse", "AreaDoor_1", 1.0f, false);
PlaySoundAtEntity("creaking_door", "joint_door_move_special.snt", "Door_1", 1.0 / 2.5f, false);
PlaySoundAtEntity("SoundBong", "scare_tingeling.snt", "Player", 0.0f, false);

AddTimer("opendoor_1", 0.25f, "TimerOpenDoor01");
AddTimer("lightsout", 1, "TimerOpenDoor01");
AddTimer("stopeffect", 2, "TimerOpenDoor01");
AddTimer("life",RandFloat(10,15),"life");

StartScreenShake(0.007f,2, 0.25f,1);

//FadePlayerFOVMulTo(1.5, 0.5f);

/*For CollideBeginSwirl
*/
PlaySoundAtEntity("SoundFeet1", "01_tiny1", "AreaBeginSwirl", 15.0f, false);

/*DEBUG
*/
AddDebugMessage("The door at "+asChild+" opens with dust", true);
}
void TimerOpenDoor01(string &in asTimer)
{
if(asTimer == "stopeffect"){
//FadePlayerFOVMulTo(1, 1);
PlaySoundAtEntity("breath", "react_breath.snt", "Player", 1.0 / 0.75f, false);
//AddTimer("lookloop", 1, "TimerRandomLook"); //Re-activate the spinning head
return;
}

if(asTimer == "lightsout"){
for(int i=1;i<=4;i++) SetLampLit("torch_static01_"+i, false, true);
for(int i=1;i<=4;i++) FadeLightTo("LightOff_"+i, 0, 0, 0, 0, 0, 1.5f);
PlaySoundAtEntity("breath2", "react_breath.snt", "Player", 1.0 / 1, false);
return;
}

PlaySoundAtEntity("Wind", "general_wind_whirl", "Player", 2, false);
PlaySoundAtEntity("scare", "react_scare.snt", "Player", 0.75f, false);

StopSound("creaking_door", 1.0f);

PlayMusic("strangeplaces.ogg", true, 1.0f, 0, 0, true);

CreateParticleSystemAtEntity("PSDoor_3", "ps_dust_push.ps", "AreaDoor_2", false);
CreateParticleSystemAtEntity("PSDoor_4", "ps_dust_push.ps", "AreaDoor_3", false);

SetSwingDoorClosed("Door_1", false, false);
SetSwingDoorDisableAutoClose("Door_1", true);

AddTimer("Door_1", 0.01f, "TimerSwingDoor");

GiveSanityDamage(10, true); <--- WHAT CUTS THE EFFECT
PlaySoundAtEntity("banging_door", "scare_slam_door", "Door_1",0.0f, false);
AddTimer("sanityeffect", 6.0f, "TimerSanityEffect"); <--- THIS IS TO CUT THE IMAGE TRAIL EFFECT
PlayMusic("strangeplaces.ogg", true, 1.0f, 0, 0, true);
}

The GiveSanityDamage(10, true); script cuts the effect. Post your reply if possible.
(This post was last modified: 03-21-2017, 10:07 PM by zionifl.)
03-21-2017, 10:00 PM
Find


Messages In This Thread
RE: Unused effects when getting sanity damage? - by zionifl - 03-21-2017, 10:00 PM



Users browsing this thread: 1 Guest(s)