Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Looking For Help? Look No More!
Jellissa13 Offline
Junior Member

Posts: 1
Threads: 0
Joined: Aug 2011
Reputation: 0
#31
RE: Looking For Help? Look No More!

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
08-30-2011, 04:53 AM
Find
Tanshaydar Offline
From Beyond

Posts: 3,085
Threads: 17
Joined: Mar 2009
Reputation: 67
#32
RE: Looking For Help? Look No More!

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

08-30-2011, 05:55 AM
Website Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#33
RE: Looking For Help? Look No More!

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.
08-30-2011, 12:01 PM
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#34
RE: Looking For Help? Look No More!

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

switch(Number_X){

}
is like saying
if(Number_X){

}
The only difference is what happens next.

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

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

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

so

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
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
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;
}


(This post was last modified: 08-30-2011, 12:57 PM by DRedshot.)
08-30-2011, 12:42 PM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#35
RE: Looking For Help? Look No More!

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

08-30-2011, 12:47 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#36
RE: Looking For Help? Look No More!

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

where you have the:

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
(This post was last modified: 08-30-2011, 12:55 PM by Tesseract.)
08-30-2011, 12:55 PM
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#37
RE: Looking For Help? Look No More!

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:


(This post was last modified: 08-30-2011, 01:00 PM by DRedshot.)
08-30-2011, 12:59 PM
Find
Tesseract Offline
Senior Member

Posts: 498
Threads: 7
Joined: Mar 2011
Reputation: 18
#38
RE: Looking For Help? Look No More!

(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
08-30-2011, 01:03 PM
Find
Mooserider Offline
Member

Posts: 64
Threads: 11
Joined: Jan 2011
Reputation: 2
#39
RE: Looking For Help? Look No More!

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

Working on a FC: "Don't Let Go "
08-30-2011, 02:43 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#40
RE: Looking For Help? Look No More!

I want to use
StartEffectEmotionFlash

Will

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?

The Interrogation
Chapter 1

My tutorials
08-30-2011, 02:46 PM
Find




Users browsing this thread: 1 Guest(s)