![]() |
Few questions - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Few questions (/thread-21296.html) |
RE: Few questions - The chaser - 05-01-2013 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() { } RE: Few questions - PutraenusAlivius - 05-01-2013 (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 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. RE: Few questions - FlawlessHappiness - 05-01-2013 (05-01-2013, 08:16 AM)Essen Wrote:Quote:Yea, with the basic settings you can fade the sepia colors. Makes everything redish. As the chaser wrote, it's just a simple timer. A timer that keeps calling itself very fast. RE: Few questions - Essen - 05-01-2013 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.... RE: Few questions - The chaser - 05-01-2013 This should explain it: http://wiki.frictionalgames.com/hpl2/tutorials/script/problem Check if there's any .map_cache. If the message doesn't change, that might be the problem. RE: Few questions - FlawlessHappiness - 05-01-2013 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. RE: Few questions - Essen - 05-01-2013 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. RE: Few questions - The chaser - 05-01-2013 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) RE: Few questions - Essen - 05-02-2013 (05-01-2013, 09:48 PM)The chaser Wrote: void OnStart() 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? RE: Few questions - The chaser - 05-03-2013 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". |