03-08-2014, 05:06 PM
03-08-2014, 05:19 PM
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
{
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
03-08-2014, 05:22 PM
void OnStart()
{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
like this ??
it shows error Unexpected token "{"
{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
like this ??
it shows error Unexpected token "{"
03-08-2014, 05:28 PM
Yes like that.
03-08-2014, 06:04 PM
You had to do something wrong. Post your .hps file.
03-08-2014, 06:45 PM
(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
03-08-2014, 06:46 PM
Just make sure that you didn't add another OnStart block if you already had one.
03-08-2014, 06:46 PM
That's what I tried to tell him XD
03-08-2014, 10:48 PM
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);
}
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);
}
03-08-2014, 10:52 PM
Move wakeUp(); into OnStart, and delete the surrounding braces:
PHP Code:
void OnStart()
{
SetPlayerLampOil(15);
SetPlayerHealth(50);
wakeUp();
}