Frictional Games Forum (read-only)

Full Version: Starting items
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
Hello can anyone help me about how to change starting oil strating sanity and starting health PLEASE

My 3rd post Yeyyy we going great!
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/amn..._functions
void OnStart()

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

it shows error Unexpected token "{"
Yes like that.
You had to do something wrong. Post your .hps file.
(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
Just make sure that you didn't add another OnStart block if you already had one.
That's what I tried to tell him XD
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);
}
Move wakeUp(); into OnStart, and delete the surrounding braces:

PHP Code:
void OnStart()

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

Pages: 1 2 3