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
#1
Question  Unused effects when getting sanity damage?

Hi, i am making a new project about the alpha of Amnesia - The Dark Descent, but i am making the whole project by myself, so i will ask for help sometimes.

The help i need now is to, if possible, add unused effects when getting sanity damage. If you watched the early alpha footage from the Super Secret folder, then you will notice that when the player gets the sanity damage (Watch when the door at the Old Archives opens by itself), there was some other effects instead of only an pulsating screen. Here are those unused effects:

*An wavy screen (Image Trail effect)
*An heartbeat after some seconds

I would like to bring back those effects to my project, but since i am only one person on the whole thing, i'm asking for help.
03-18-2017, 06:59 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#2
RE: Unused effects when getting sanity damage?

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.

03-19-2017, 05:19 AM
Find
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
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Unused effects when getting sanity damage?

If GiveSanityDamage overrides the ImageTrail effect, you could instead use FadePlayerAspectMulTo to stretch the screen (again using timers and appropriate values) to simulate the stretching effect of GiveSanityDamage.

Then by disabling the effect on the GiveSanityDamage script, they may work together.

(This post was last modified: 03-21-2017, 11:04 PM by Mudbill.)
03-21-2017, 11:03 PM
Find




Users browsing this thread: 1 Guest(s)