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
Would this work?
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#1
Would this work?

I want to make a Wake Up intro to this map, and the Wake Up I found in the forums is not what I want. I copied and pasted this from the 25_cells_tunnels.hps file, and I wonder if this is what I need to be able to do a Wake Up.

.hps
Spoiler below!

void TimerBlackOut(string &in asTimer)
{
AddLocalVarInt("BlackoutStep", 1); //What step to play in the event
float fEventSpeed = 0.5f; //The default time between steps in an event

switch(GetLocalVarInt("BlackoutStep")) {
case 1:
StartPlayerLookAt("Arealook2", 0.1f, 0.1f, "");
SetEntityActive("servant_grunt_1", true);
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", 4.0f, "IdleExtra3");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", 0.0f, "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_8", 0.0f, "");
FadeIn(4);
FadeImageTrailTo(2,1);
SetPlayerMoveSpeedMul(0.05f);
SetPlayerLookSpeedMul(0.05f);
PlaySoundAtEntity("pant", "react_pant.snt", "Player", 2, false);
fEventSpeed = 3.0f;
break;
case 2:
FadePlayerRollTo(85, 1, 1);
break;
case 3:
SetPlayerActive(true);
StartPlayerLookAt("Arealook3", 0.1f, 0.1f, "");
break;
case 4:
FadeImageTrailTo(0,1);
FadePlayerRollTo(65, 1, 1);
break;
case 5:
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 2, false);
FadeOut(2);
fEventSpeed = 1.5f;
break;
case 6:
FadePlayerRollTo(85, 1, 4);
StartPlayerLookAt("Arealook1", 0.1f, 0.1f, "");
break;
case 7:
FadeImageTrailTo(1.8f,1.5f);
FadePlayerFOVMulTo(1.25f, 0.01);
break;
case 8:
FadePlayerRollTo(45, 1, 2);
FadeIn(2);
fEventSpeed = 1.5f;
break;
case 9:
StartPlayerLookAt("Arealook2", 0.1f, 0.1f, "");
break;
case 10:
FadePlayerRollTo(15, 1, 2);
FadePlayerFOVMulTo(0.75f, 0.01);
break;
case 11:
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1.5f, false);
FadeOut(1);
StartPlayerLookAt("Arealook3", 1, 1, "");
FadePlayerRollTo(50, 1, 2);
fEventSpeed = 2.0f;
break;
case 12:
SetPlayerMoveSpeedMul(0.1f);
SetPlayerLookSpeedMul(0.1f);
StartPlayerLookAt("Arealook1", 1, 1, "");
FadePlayerFOVMulTo(1.1f, 0.01);
FadeImageTrailTo(0,1.5f);
fEventSpeed = 1.5f;
break;
case 13:
SetPlayerMoveSpeedMul(0.2f);
SetPlayerLookSpeedMul(0.2f);
FadePlayerRollTo(-15, 1, 2);
FadeIn(1);
StartPlayerLookAt("Arealook4", 2, 2, "");
fEventSpeed = 2.0f;
break;
case 14:
SetPlayerMoveSpeedMul(0.3f);
SetPlayerLookSpeedMul(0.3f);
FadePlayerRollTo(-30, 10, 60);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
StartPlayerLookAt("Arealook3", 1, 1, "");
FadePlayerFOVMulTo(0.9f, 0.01);
FadeImageTrailTo(1.5,2);
PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
break;
case 15:
SetPlayerMoveSpeedMul(0.4f);
SetPlayerLookSpeedMul(0.4f);
FadePlayerRollTo(10, 10, 20);
MovePlayerHeadPos(0, -0.5f, 0, 1, 0.5f);
break;
case 16:
SetPlayerMoveSpeedMul(0.5f);
SetPlayerLookSpeedMul(0.5f);
FadePlayerRollTo(0, 10, 60);
MovePlayerHeadPos(0, 0, 0, 1, 0.5f);
StartPlayerLookAt("Arealook4", 2, 2, "");
FadePlayerFOVMulTo(1, 0.01f);
PlaySoundAtEntity("movement", "player_climb.snt", "Player", 0, false);
SetPlayerCrouchDisabled(false);
fEventSpeed = 1.0f;
break;
case 17:
SetPlayerMoveSpeedMul(0.6f);
SetPlayerLookSpeedMul(0.6f);
FadeImageTrailTo(0,0.2f);
StopPlayerLookAt();
PlaySoundAtEntity("sigh", "react_sigh.snt", "Player", 1.0 / 1, false);
fEventSpeed = 1.0f;
break;
case 18:
SetPlayerJumpDisabled(false);
SetPlayerMoveSpeedMul(1.0f);
SetPlayerRunSpeedMul(1.0f);
SetPlayerLookSpeedMul(1.0f);
for(int i=1;i<=7;++i)
AddEffectVoice("CH03L25_Alexander_0"+i, "", "Voice", "CH03L25_Alexander_0"+i, false, "", 0.0f, 0.0f);

break;
}

if(GetLocalVarInt("BlackoutStep") < 19) AddTimer("blackout", fEventSpeed, "TimerBlackOut");
}


Except maybe edit it to what I need? I also don't want it to play Alexander's voice at the end, so can I just remove that? Please tell me what I can delete, what not to delete, even make edit the script, and make everything I need to change a "ChangeThis" (with quotes, because It will obviously be in the void)

Thanks in Advance.

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
05-25-2011, 03:46 AM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Would this work?

First of all, you have to start that with a timer:
AddTimer("anything", 0.0f, "TimerBlackOut");

Then you can edit anything between case x: and break;
You can also reduce the amount of cases by just removing them.
using fEventSpeed = x; you can change the speed at which the next case comes.
05-25-2011, 06:31 AM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#3
RE: Would this work?

(05-25-2011, 06:31 AM)Khyrpa Wrote: First of all, you have to start that with a timer:
AddTimer("anything", 0.0f, "TimerBlackOut");

Then you can edit anything between case x: and break;
You can also reduce the amount of cases by just removing them.
using fEventSpeed = x; you can change the speed at which the next case comes.

Okay. I want it to be the exact same speed as it is in the main game, so I wouldn't change the fEventSpeed. Thanks Smile
Also, what would I put in the "anything" slot? Just, anything?

What is the for(int i=1;i<=7;++i)

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 05-25-2011, 03:09 PM by RawkBandMan.)
05-25-2011, 02:49 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#4
RE: Would this work?

(05-25-2011, 02:49 PM)XxRoCkBaNdMaNxX Wrote: Okay. I want it to be the exact same speed as it is in the main game, so I wouldn't change the fEventSpeed. Thanks Smile
Also, what would I put in the "anything" slot? Just, anything?
What is the for(int i=1;i<=7;++i)

First the "anything" is just any name you wanna give the timer (any name will do...). You may need it for example when you use: RemoveTimer(string& asName);

The for(int i=1;i<=7;++i) means that it puts 7 lines of those voices after another like this: (it saves space)

AddEffectVoice("CH03L25_Alexander_01, "", "Voice", "CH03L25_Alexander_01, false, "", 0.0f, 0.0f);
AddEffectVoice("CH03L25_Alexander_02, "", "Voice", "CH03L25_Alexander_02, false, "", 0.0f, 0.0f);
AddEffectVoice("CH03L25_Alexander_03, "", "Voice", "CH03L25_Alexander_03, false, "", 0.0f, 0.0f);... and so on
05-25-2011, 03:23 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#5
RE: Would this work?

(05-25-2011, 03:23 PM)Khyrpa Wrote:
(05-25-2011, 02:49 PM)XxRoCkBaNdMaNxX Wrote: Okay. I want it to be the exact same speed as it is in the main game, so I wouldn't change the fEventSpeed. Thanks Smile
Also, what would I put in the "anything" slot? Just, anything?
What is the for(int i=1;i<=7;++i)

First the "anything" is just any name you wanna give the timer (any name will do...). You may need it for example when you use: RemoveTimer(string& asName);

The for(int i=1;i<=7;++i) means that it puts 7 lines of those voices after another like this: (it saves space)

AddEffectVoice("CH03L25_Alexander_01, "", "Voice", "CH03L25_Alexander_01, false, "", 0.0f, 0.0f);
AddEffectVoice("CH03L25_Alexander_02, "", "Voice", "CH03L25_Alexander_02, false, "", 0.0f, 0.0f);
AddEffectVoice("CH03L25_Alexander_03, "", "Voice", "CH03L25_Alexander_03, false, "", 0.0f, 0.0f);... and so on
Where do I put RemoveTimer("BlackOut");?

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
05-25-2011, 03:53 PM
Find
ferryadams10 Offline
Senior Member

Posts: 288
Threads: 40
Joined: Apr 2011
Reputation: 19
#6
RE: Would this work?

Dude,

Get a life and start learning scripting urself Tongue

Got a nice sofa
Please come and have a seat for a while

05-25-2011, 03:55 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#7
RE: Would this work?

(05-25-2011, 03:55 PM)ferryadams10 Wrote: Dude,

Get a life and start learning scripting urself Tongue

I know, but I literally suck. I've tried to do this stuff myself and It gave me like a big ass list of errors, that I didn't know how to fix.

I'm even thinking of cancelling my custom stories for 2 reasons.

1. I suck at scripting
2. My PC hates Amnesia and crashes 50% of the time on Start Up.

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
(This post was last modified: 05-25-2011, 04:18 PM by RawkBandMan.)
05-25-2011, 04:18 PM
Find
Roenlond Offline
Senior Member

Posts: 331
Threads: 3
Joined: Apr 2011
Reputation: 0
#8
RE: Would this work?

(05-25-2011, 03:55 PM)ferryadams10 Wrote: Dude,

Get a life and start learning scripting urself Tongue

Why would he have no life for asking for help in a forum?

Why isn't he allowed to ask questions, anyhow? No one is forcing you to read or reply - just move on if you are too lazy to help a fellow man out.

Canceling or not, that is your decision entirely but I suggest you keep working for a little longer - your scripting abilities will never improve if you never practice Smile
05-25-2011, 05:02 PM
Find
RawkBandMan Offline
Posting Freak

Posts: 1,146
Threads: 35
Joined: Nov 2010
Reputation: 5
#9
RE: Would this work?

(05-25-2011, 05:02 PM)Roenlond Wrote: Canceling or not, that is your decision entirely but I suggest you keep working for a little longer - your scripting abilities will never improve if you never practice Smile

Yeah, but Amnesia crashing my PC entirely is a big problem, and it's starting to worry me. I even got a Blue Screen from it this morning. I don't think I will cancel it, but it is a possibility.

I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets.
05-25-2011, 11:35 PM
Find




Users browsing this thread: 1 Guest(s)