Frictional Games Forum (read-only)
[SCRIPT] Starting items - 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)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Starting items (/thread-24780.html)

Pages: 1 2 3


Starting items - Straxedix - 03-08-2014

Hello can anyone help me about how to change starting oil strating sanity and starting health PLEASE

My 3rd post Yeyyy we going great!


RE: Starting items - Slanderous - 03-08-2014

void OnStart()
{
SetPlayerLampOil(X);
SetPlayerHealth(X);
}

put how much would you like to have oil and health on start instead of X, for example 25.

Was it hard? Everything that you need is here

http://wiki.frictionalgames.com/hpl2/amnesia/script_functions


RE: Starting items - Straxedix - 03-08-2014

void OnStart()

{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
like this ??

it shows error Unexpected token "{"


RE: Starting items - DnALANGE - 03-08-2014

Yes like that.


RE: Starting items - Slanderous - 03-08-2014

You had to do something wrong. Post your .hps file.


RE: Starting items - Radical Batz - 03-08-2014

(03-08-2014, 05:22 PM)Straxedix Wrote: void OnStart()

{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
like this ??

it shows error Unexpected token "{"



Maybe you copied the void onstart() and pasted it! don't do another void onstart

what you're supposed to do is paste this in/near void onstart

Code:
SetPlayerLampOil(15);
SetPlayerHealth(50);

see if that works


RE: Starting items - Mudbill - 03-08-2014

Just make sure that you didn't add another OnStart block if you already had one.


RE: Starting items - Radical Batz - 03-08-2014

That's what I tried to tell him XD


RE: Starting items - Straxedix - 03-08-2014

My .hps file of that level when i start

void OnStart()

{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}

{
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();
SetMessage("TextCategory", "TextEntry", 0);
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(true);
FadeImageTrailTo(0,1);
}


RE: Starting items - Romulator - 03-08-2014

Move wakeUp(); into OnStart, and delete the surrounding braces:

PHP Code:
void OnStart()

{
SetPlayerLampOil(15);
SetPlayerHealth(50);
wakeUp();