Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
Starting items
Hello can anyone help me about how to change starting oil strating sanity and starting health PLEASE
My 3rd post Yeyyy we going great!
(This post was last modified: 03-08-2014, 05:25 PM by Kreekakon.)
|
|
03-08-2014, 05:06 PM |
|
Slanderous
Posting Freak
Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation:
63
|
RE: Starting items
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
|
|
03-08-2014, 05:19 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
RE: Starting items
void OnStart()
{
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
like this ??
it shows error Unexpected token "{"
(This post was last modified: 03-08-2014, 05:23 PM by Straxedix.)
|
|
03-08-2014, 05:22 PM |
|
DnALANGE
Banned
Posts: 1,549
Threads: 73
Joined: Jan 2012
|
RE: Starting items
Yes like that.
|
|
03-08-2014, 05:28 PM |
|
Slanderous
Posting Freak
Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation:
63
|
RE: Starting items
You had to do something wrong. Post your .hps file.
|
|
03-08-2014, 06:04 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: Starting items
(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
SetPlayerLampOil(15);
SetPlayerHealth(50);
see if that works
(This post was last modified: 03-08-2014, 06:46 PM by Radical Batz.)
|
|
03-08-2014, 06:45 PM |
|
Mudbill
Muderator
Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation:
179
|
RE: Starting items
Just make sure that you didn't add another OnStart block if you already had one.
|
|
03-08-2014, 06:46 PM |
|
Radical Batz
Posting Freak
Posts: 953
Threads: 145
Joined: Dec 2013
Reputation:
25
|
RE: Starting items
That's what I tried to tell him XD
|
|
03-08-2014, 06:46 PM |
|
Straxedix
Senior Member
Posts: 426
Threads: 52
Joined: Mar 2014
Reputation:
5
|
RE: Starting items
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);
}
|
|
03-08-2014, 10:48 PM |
|
Romulator
Not Tech Support ;-)
Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation:
195
|
RE: Starting items
Move wakeUp(); into OnStart, and delete the surrounding braces:
void OnStart()
{ SetPlayerLampOil(15); SetPlayerHealth(50); wakeUp(); }
Discord: Romulator#0001
|
|
03-08-2014, 10:52 PM |
|
|