Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Starting items
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
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
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#2
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
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#3
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
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#4
RE: Starting items

Yes like that.
03-08-2014, 05:28 PM
Find
Slanderous Offline
Posting Freak

Posts: 1,606
Threads: 78
Joined: Dec 2012
Reputation: 63
#5
RE: Starting items

You had to do something wrong. Post your .hps file.
03-08-2014, 06:04 PM
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#6
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
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#7
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
Find
Radical Batz Offline
Posting Freak

Posts: 953
Threads: 145
Joined: Dec 2013
Reputation: 25
#8
RE: Starting items

That's what I tried to tell him XD
03-08-2014, 06:46 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#9
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
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#10
RE: Starting items

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

PHP Code: (Select All)
void OnStart()

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


Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-08-2014, 10:52 PM
Find




Users browsing this thread: 5 Guest(s)