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
Few questions
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#21
RE: Few questions

To use that script you need the Justine expansion, just saying in case you don't have. Here's a simple cinematic scene:

[code]

void OnStart()
{
///You start in the first part of the cinematic level. You put whatever you think it was the more important part. You make the player walk by the zone to an area (Script_teleport_1, and other)

AddTimer("", 0.01, "Move"); ///The time may have to be changed for speed reasons
StartPlayerLookAt("Script_teleport_1", 1, 1, "");
for (int i = 1; i<4; i++) //The i<4 assumes you have 4 zones in the cinematic level
{
AddEntityCollideCallback("Player", "Script_teleport_+i", "Tele_+i", true, 1);
}

void Tele_1 (string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_tele_1");
}

void Tele_2 (string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_tele_2");
}

void Tele_3 (string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_tele_3");
}

void Tele_4 (string &in asParent, string &in asChild, int alState)
{
TeleportPlayer("PlayerStartArea_tele_4");
}


}

void Move (string &in asTimer)
{
AddTimer("", 0.01, "Move"); ///The time may have to be changed for speed reasons
MovePlayerForward(1);
}

void OnEnter()
{

}

void OnLeave()
{

}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-01-2013, 11:29 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#22
RE: Few questions

(05-01-2013, 08:16 AM)Essen Wrote:
(04-30-2013, 06:57 AM)JustAnotherPlayer Wrote:
(04-30-2013, 06:09 AM)Essen Wrote:
(04-29-2013, 09:17 PM)BeeKayK Wrote: Sure Smile What kind of effects are we talking about?

Something like, how to explain it, basically, character would remember some scenes of what he went through, like it was suggested by Chaser earlier. It woule be his memories. I would need some suiting colors and all that.

Also, how to do these cutscenes you talk about? Isn't it needed to make new map and place all the places I want the character to go through in it to avoid loading of the maps?

This is required to make the screen albeit dark red. For black and white, you need a FC if I'm not mistaken.
PHP Code: (Select All)
FadeSepiaColorTo(float afAmountfloat afSpeed); 
afAmount - Intensity (Default is 0)
afSpeed - Time in seconds until it's full effect.

--
You don't have to make new maps. Just create new areas in a level and make the player to teleport to that area. Here's how.
Please note that they have to be called first.

PHP Code: (Select All)
void OnStart()
{
///Add Command here
}

void //FUNCTION//(//string//)
{
FadeOut(0.8f);
SetPlayerActive(false);
TeleportPlayer("StartPos"); //StartPos is the starting position in the area. It's the PlayerStartArea.
AddTimer(""3.0f"FadeIn"); //Change 3.0f to how long you want the unconcusf to endure. Definitely didn't said that one right.
}

void FadeIn(string &in asTimer)
{
FadeIn(1.0f);
//Insert the Sepia thing here.


Can't it to work, keep getting the "Unexpected end of file" error. There might be a problem with that(//string//) part, I tried to put "" into it, then leave it blank, but still nothing.

Of course it doesn't work. Here, I'm gonna ask you something.
"Do you want the effect to occur while the Player is doing what?" while hes masturbating
This helps me to determine what function and string.

"Veni, vidi, vici."
"I came, I saw, I conquered."
05-01-2013, 11:34 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#23
RE: Few questions

(05-01-2013, 08:16 AM)Essen Wrote:
Quote:Yea, with the basic settings you can fade the sepia colors. Makes everything redish.
You can fade the screen in and out.
You can turn the head of the character to any degree you want.
You can force the player to stand, crouch, look at something, walk, or make the actual player unable to control.
You can make the blurry effect that happens when you look at a monster.
You can make a fading blurry effect that looks a little like Motionblur, but it's not the same. This one is much slower.
You can teleport the player. This is good when you make a transition/intro/outro. First fade out the screen, then teleport the player, then fade in.

Most information about how to use them are actually already given in the EngineScripts.

How do you make player to walk forward actually? I found script "MovePlayerForward" on wiki, in EngineScripts, however, didn't quite get it.

As the chaser wrote, it's just a simple timer. A timer that keeps calling itself very fast.

Trying is the first step to success.
05-01-2013, 12:09 PM
Find
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#24
RE: Few questions

Thanks a lot to everyone who replied, you all quite helped me. I'm bad at scripting. I will try to use that timer The_chaser sent me.

However, I got to a problem. I tried out that script with teleporting before I actually realised that I messed up the function. Suddenly, the map just wouldn't load, like, it keeps saying "Unexpected end of file", I already tried to delete the script, it still says the same, except different numbers depending on where the last } bracket actually is. It doesn't have to do anything with this. I tried to search through the .hps file to find any problem with things like ", or (, but haven't found any. What is cause of "Unexpected end of file"? Does the scripts have to be somehow arranged?
I have tried to search around already, however, haven't found anything that would help me. Well, rather than that, everyone had different problem....
(This post was last modified: 05-01-2013, 12:48 PM by Essen.)
05-01-2013, 12:41 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#25
RE: Few questions

This should explain it:

http://wiki.frictionalgames.com/hpl2/tut...pt/problem

Check if there's any .map_cache. If the message doesn't change, that might be the problem.

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-01-2013, 02:01 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#26
RE: Few questions

When you write symbols like { and " and ( in a script file, it has to be ended again.
You can't leave a { without also writing a }

Unexpected end of file means:
The script file has a beginning-bracket, but no ending bracket.

To solve it:
Find the { or ( or " and correct it.

Trying is the first step to success.
(This post was last modified: 05-01-2013, 02:16 PM by FlawlessHappiness.)
05-01-2013, 02:16 PM
Find
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#27
RE: Few questions

Thanks, guys.
I was missing } at one of the scripts and didn't notice it.

Can't manage to stop that sound I was talking about however. I decided to leave that cutscene thingy until I finish other maps, and started working on Good Ending-meaning the one with the credits at the end, no cutscene.
There's a part where monsters start breaking in and you have to make a run for it, in this part, one custom sound starts playing. It should stop once player runs through Script Area, screen fades to white and credits suddenly start. The sound is supposed to stop here aswell. However, the sound just won't stop. I tried to create another script area right before the script area that makes credits appear. Still, it doesn't work. I have checked the name, script, went on Google and tried to search it, everything seems to be alright. No idea where I messed it up. Game starts, no crash, everything fine, the script just doesn't work.
05-01-2013, 04:23 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#28
RE: Few questions

void OnStart()
{
////Monsters appear
PlaySoundAtEntity("Thenameofyoursound", "Player", 0.1, false);
AddEntityCollideCallback("Player", "EndingArea", "Stahp", tue, 1);
}

void Stahp (string &in asParent, string &in asChild, int alState)
{
StopSound("Thenameofyoursound", 0.1);
///Yourcredits and other
}

I suggest you to invert my suggestion: If you escape, make the player see the cutscenes (like if the protagonist was remaining what happened to him), and, if you die, credits, as there's nothing to remain (you're dead)

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-01-2013, 09:48 PM
Find
Essen Offline
Junior Member

Posts: 23
Threads: 2
Joined: Jul 2011
Reputation: 0
#29
RE: Few questions

(05-01-2013, 09:48 PM)The chaser Wrote: void OnStart()
{
////Monsters appear
PlaySoundAtEntity("Thenameofyoursound", "Player", 0.1, false);
AddEntityCollideCallback("Player", "EndingArea", "Stahp", tue, 1);
}

void Stahp (string &in asParent, string &in asChild, int alState)
{
StopSound("Thenameofyoursound", 0.1);
///Yourcredits and other
}



I suggest you to invert my suggestion: If you escape, make the player see the cutscenes (like if the protagonist was remaining what happened to him), and, if you die, credits, as there's nothing to remain (you're dead)


I don't get it, it still doesn't work.... Made it all exactly how it should be, renamed Script Area, put in the exact name of the sound, but just no....
Any other idea?
(This post was last modified: 05-03-2013, 01:11 PM by Essen.)
05-02-2013, 04:51 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#30
RE: Few questions

void OnStart()

{

////Monsters appear

PlaySoundAtEntity("Thenameofyoursound", "Player", 0.1, false);

AddEntityCollideCallback("Player", "EndingArea", "Stahp", true, 1);

}



void Stahp (string &in asParent, string &in asChild, int alState)

{

StopSound("Thenameofyoursound", 0.1);

///Yourcredits and other

}

Oh my god, use this one, I writed "tue" instead "true".

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
05-03-2013, 01:22 PM
Find




Users browsing this thread: 3 Guest(s)