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
Try this instead!

Code:
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);
}
Yeah, but Badcat, you removed the starting Sanity and Health thing.. :p
But what about sanity no one know ?
no i did not I put it in the void begin story
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
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
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
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
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;

Code:
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.
yeah i need this but how to make it to a script :O ?
Pages: 1 2 3