Frictional Games Forum (read-only)
Looking For Help? Look No More! - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+--- Thread: Looking For Help? Look No More! (/thread-10026.html)

Pages: 1 2 3 4 5 6 7 8 9 10


RE: Looking For Help? Look No More! - Jellissa13 - 08-30-2011

I'm confused about what exactly it takes to make a custom story and also I'm not sure I can do it... AngryAngryAngry I have nothing downloaded or anything, so if literally ANYONE could help me, step by step, general directions, anything would help cause I think I have some pretty cool ideas...Big Grin


RE: Looking For Help? Look No More! - Tanshaydar - 08-30-2011

This should help you: http://wiki.frictionalgames.com/hpl2/start


RE: Looking For Help? Look No More! - Tesseract - 08-30-2011

Hi Kyle new question, im starting to go into the depths of scripting, getting out of my comfort zone, can you explain a switch statement and what it takes for it to work ive looked at the Amnesia 101 thread it makes no sense to me, it tells me what it does and shows the structure but how do i make the structure follow the next case?

what does it need to make it do what you want it to do, such as, intro's, screen effects or whatever else they do, can you explain it to me in layman's terms so that a noob like myself knows how it works, im sure once you were in my position and can understand exactly where im coming from.


RE: Looking For Help? Look No More! - DRedshot - 08-30-2011

A switch statement is kinda like a list of if statements, but kept in a nice neat form.
Spoiler below!

Code:
switch(Number_X){

}
is like saying
Code:
if(Number_X){

}
The only difference is what happens next.

With an if statement you write the condition as
Spoiler below!

Code:
if((Number_X) == 1){
// Number_X == 1
}
But with a switch statement, it goes like this:
Code:
switch(Number_X){
case 1:
// Number_X == 1
break;
}

think of "case 1:" as the computer saying "if the value is 1"

so

Code:
switch(Number_Y){
case 1:
// Do this stuff if Number_Y is 1
break;
case 2:
// Do this stuff if Number_Y is 2
break;
case 3:
// Do this stuff if Number_Y is 3
break;
}
is like the computer saying
"Get the value of "Number_Y" for me!
If it is 1, do the stuff in case 1:
If it is 2, do the stuff in case 2:
If it is 3, do the stuff in case 3:
If it is x, do the stuff in case x:"

once you understand how it works look here

Hopefully this helps! think of it as multiple if statements in a row.
Smile

Edit: just a couple of scripts to see how if's differ from switch! Smile
Spoiler below!

How it looks in switch format
Code:
switch(GetLocalVarInt("Number")){

case 1:
PlaySoundAtEntity("" , "Boom.snt" , "Door_1" , 0.5f , false);
break;

case 2:
AddTimer("Delay_1" , 5.5f , "Timer");
break;

case 3:
CreateParticleSystemAtEntity("" , "ps_smoke.ps" , "Area_3" , false);
break;

}
is the same as
Code:
if(GetLocalVarInt("Number")==1){
PlaySoundAtEntity("" , "Boom.snt" , "Door_1" , 0.5f , false);
return;
}

if(GetLocalVarInt("Number")==2){
AddTimer("Delay_1" , 5.5f , "Timer");
return;
}

if(GetLocalVarInt("Number")==3){
CreateParticleSystemAtEntity("" , "ps_smoke.ps" , "Area_3" , false);
return;
}




RE: Looking For Help? Look No More! - Kyle - 08-30-2011

Erg, It appears I was too slow to answer. xD


RE: Looking For Help? Look No More! - Tesseract - 08-30-2011

thanks a bunch Smile ill see how i go with this!

where you have the:

Code:
switch(Number_Y){
case 1:
// Do this stuff if Number_Y is 1
break;
case 2:
// Do this stuff if Number_Y is 2
break;
case 3:
// Do this stuff if Number_Y is 3
break;
}


where would the Y == 2 go?
in case 2: ?



(08-30-2011, 12:47 PM)Kyle Wrote: Erg, It appears I was too slow to answer. xD

it wouldn't hurt to have 2 answers Wink



RE: Looking For Help? Look No More! - DRedshot - 08-30-2011

I just updated the post, look in the spoiler tags at the bottom of my last post Smile

And yes, if(Y == 2) is the same as case 2:




RE: Looking For Help? Look No More! - Tesseract - 08-30-2011

(08-30-2011, 12:59 PM)DRedshot Wrote: I just updated the post, look in the spoiler tags at the bottom of my last post Smile

And yes, if(Y == 2) is the same as case 2:

Ok thank you ill give it a try and see how i go Smile


RE: Looking For Help? Look No More! - Mooserider - 08-30-2011

Can you please explain for statements to me in a way I can understand? Big Grin
Every time I see an explanation of it my brain explodes Tongue I just don't get it.

Thanks in advance! Smile It's really kind of you to offer help to people. Smile


RE: Looking For Help? Look No More! - Elven - 08-30-2011

I want to use
StartEffectEmotionFlash

Will

Code:
bool GetFlashbackIsActive();

Checks whether a flashback is still in effect.

work if i want that something will happen STRAIGHT after you watch watching this white text Smile?