Frictional Games Forum (read-only)
Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related (/thread-5545.html)

Pages: 1 2


Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - kewl - 11-27-2010

None of my scripts ever work. Ever. I've tried atleast 40 of them, and none of them ever worked. I don't see what I could be doing wrong... I follow directions exactly... even when I'm just supposed to copy a script out and paste it in it won't work.

The only possible reason I could come up with as to why they never work is that it's just broken, if that can even happen.

Is there something I'm doing wrong?


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - Kyle - 11-27-2010

(11-27-2010, 05:26 PM)kewl Wrote: None of my scripts ever work. Ever. I've tried atleast 40 of them, and none of them ever worked. I don't see what I could be doing wrong... I follow directions exactly... even when I'm just supposed to copy a script out and paste it in it won't work.

The only possible reason I could come up with as to why they never work is that it's just broken, if that can even happen.

Is there something I'm doing wrong?

Okay, now just take it easy. First, you got to show us an example of one of the scripts. Second, you need to show us what things that are in your custom story that you want to put into the script.


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - kewl - 11-27-2010

(11-27-2010, 07:08 PM)Kyle Wrote: you got to show us an example of one of the scripts.

I'm trying to do a wake up script. I copied it out of another thread: http://www.frictionalgames.com/forum/thread-4626.html


This is what my script looks like:

void onStart()
{
void wakeUp();
}
void wakeUp () {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}




I can get into the map, but the script doesnt happen.


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - LoneWolf - 11-27-2010

wheres void onstart and void on enter ?


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - kewl - 11-27-2010

(11-27-2010, 07:53 PM)LoneWolf Wrote: wheres void onstart and void on enter ?

void onstart is in my last post.

I didn't copy void onEnter into the post


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - machosalad - 11-27-2010

You shouldn't write "void wakeUp();" when you execute a function.
Instead write "WakeUp();"


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - LoneWolf - 11-27-2010

does map work at all? post your full hps. you will have a small mistake... maybe missing/extra { or } (token). happened to me, i had two { in my hps and effected all scripts.


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - kewl - 11-27-2010

(11-27-2010, 08:14 PM)LoneWolf Wrote: does map work at all? post your full hps. you will have a small mistake... maybe missing/extra { or } (token). happened to me, i had two { in my hps and effected all scripts.

void onStart()
{
wakeUp();
}
void wakeUp () {
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer){
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
void OnEnter()
{

}

void OnLeave()
{

}


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - LoneWolf - 11-27-2010

i dont see any problems. im not sure but i do this.




////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");
}
void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}






copy paste mine.


RE: Big Problem: OH PLEASSE HELP ME OH GOD!!! Script Related - kewl - 11-27-2010

(11-27-2010, 08:22 PM)LoneWolf Wrote: i dont see any problems. im not sure but i do this.




////////////////////////////
// Run first time starting map
void OnStart()
{
wakeUp();
}
void wakeUp ()
{
FadeOut(0);
FadeIn(20);
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220);
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true);
AddTimer("trig1", 11.0f, "beginStory");
}
void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33);
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}
////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}






copy paste mine.

That worked.

Thank you, alot.

Is there something wrong with how I configured my .hps file? It looks different from yours.