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
Radical Batz Offline
Posting Freak

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

Try this instead!

void OnStart()

{
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);
SetPlayerLampOil(15);
SetPlayerHealth(50);
}
(This post was last modified: 03-08-2014, 10:55 PM by Radical Batz.)
03-08-2014, 10:53 PM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,623
Threads: 62
Joined: Jan 2013
Reputation: 195
#12
RE: Starting items

Yeah, but Badcat, you removed the starting Sanity and Health thing.. :p

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-08-2014, 11:00 PM
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#13
RE: Starting items

But what about sanity no one know ?

03-08-2014, 11:01 PM
Find Reply
Radical Batz Offline
Posting Freak

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

no i did not I put it in the void begin story
03-08-2014, 11:04 PM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,623
Threads: 62
Joined: Jan 2013
Reputation: 195
#15
RE: Starting items

Sorry xD put this in OnStart();

SetPlayerSanity(X);

Where X is a value between 0 and 100. Anything below 52 will steadily climb back to that in the light.

Edit: Sorry, missed that Badcat. Would usually have those scripts in OnStart(); :p

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 03-08-2014, 11:05 PM by Romulator.)
03-08-2014, 11:04 PM
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#16
RE: Starting items

Yeah that's it i added you to buddy list if is that okay but i have 1 more question Smile
It is realllllllly hard but i think you can solve it
When i enter 1 room open doors now look carefull
*He automaticly (you can't controll player) turn behind him and door's stuck and it cannot open*
*Then he go up (player control) and NOT PLAYER I THINK IT'S BACKGROUND start to shake then black screen (like original amnesia) and water come :S*
Or i made imagine that is not possible xD

(This post was last modified: 03-08-2014, 11:12 PM by Straxedix.)
03-08-2014, 11:09 PM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,623
Threads: 62
Joined: Jan 2013
Reputation: 195
#17
RE: Starting items

Actually, all of this can be done. I'm not going to write up how to do it, because you have the idea, but be sure to look at the Engine Scripts page on the wiki;

http://wiki.frictionalgames.com/hpl2/amn..._functions

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-08-2014, 11:12 PM
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#18
RE: Starting items

That's really hard im noob at scripts can make this please i think you won't help just me you will help other peoples who will watch this Thread (i hope so) Big Grin
Cmnnn please Smile and seee this
My time to make this:10-25 days
You:I think about 15 mins Wink

03-08-2014, 11:15 PM
Find Reply
Romulator Offline
Not Tech Support ;-)

Posts: 3,623
Threads: 62
Joined: Jan 2013
Reputation: 195
#19
RE: Starting items

Well, I'll give you some pseudocode, at least on what I think you're trying to do. Use this as a starting point to get you to understand what coding you'll need;

BEGIN
- Will need water and water_area disabled to begin
- Will need ScriptArea2 to be disabled to begin.
- Will need ScriptArea1 to be enabled to begin.
- START SEQUENCE

SEQUENCE
- Player enters a room
  - Takes a few steps forward
  - Remove player control - Turns around and door is closed and locked suddenly = will need ScriptArea1
  - Restore player control - Player walks over to the door
  - Remove player control at door - will need ScriptArea2
  - Screen starts to shake followed shortly by sudden Fade to black
  - Water is now enabled while screen is black
  - Fade screen back in and restore player control.
END SEQUENCE

If that's what you need, then you can convert it to script, and you'll need to add some things to your level via the Level Editor, like the ScriptAreas and water/water_areas.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
03-08-2014, 11:29 PM
Find Reply
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#20
RE: Starting items

yeah i need this but how to make it to a script :O ?

03-08-2014, 11:31 PM
Find Reply




Users browsing this thread: 1 Guest(s)