Frictional Games Forum (read-only)
I need some Help. HARDCORE SCRIPT :P - 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: I need some Help. HARDCORE SCRIPT :P (/thread-9238.html)

Pages: 1 2


I need some Help. HARDCORE SCRIPT :P - Angerpull - 07-19-2011

Hey I was wondering. How can I make the same effect as the one in The Dark Descent. When you walk into the room, and BOOM! You get pitch black and it's water. Then the water lurkers comes to poke you.

You know, you walk two steps and then BAM! It happens.

If Frictional themselves could provide me with the same script that would be awesome.

I really... REALLY need this. REALLY! It would complete my work, well I am still making the map, but it would make it cooler if I had that effect. I am going to have it go BOOM! Then the Entire room Changes from bright and friendly, to dark and sinister.

Hope I can get help with this!

Angerpull Angel


RE: I need some Help. HARDCORE SCRIPT :P - Randomeaninglessword - 07-19-2011

You can always open the .hps folder for the level in the game to use the code or base your code around their code. It's in Amnesia - The Dark Descent, redist, maps, main, ch01, and then I believe it's 07_archives_cellar.hps.


RE: I need some Help. HARDCORE SCRIPT :P - Kurton - 07-19-2011

That was a teleport deal. Take two identical rooms, one dry and water-lurker-free, one dark and water-filled, and when the player, in the "clean" room, hits an Area, it fades out quick, teleports the player, plays a splash effect, spawn the lurker, etc.


RE: I need some Help. HARDCORE SCRIPT :P - Angerpull - 07-19-2011

(07-19-2011, 01:53 AM)Kurton Wrote: That was a teleport deal. Take two identical rooms, one dry and water-lurker-free, one dark and water-filled, and when the player, in the "clean" room, hits an Area, it fades out quick, teleports the player, plays a splash effect, spawn the lurker, etc.

I see. But how is this performed?




RE: I need some Help. HARDCORE SCRIPT :P - Tanshaydar - 07-19-2011

(07-19-2011, 01:49 AM)Angerpull Wrote: If Frictional themselves could provide me with the same script that would be awesome.

They already provided it with the official level files. It's up to you to open the files and check the script.


RE: I need some Help. HARDCORE SCRIPT :P - Angerpull - 07-19-2011

(07-19-2011, 02:08 AM)Tanshaydar Wrote:
(07-19-2011, 01:49 AM)Angerpull Wrote: If Frictional themselves could provide me with the same script that would be awesome.

They already provided it with the official level files. It's up to you to open the files and check the script.

I just did... Made no effing sense in my eyes. I usually see the

AddCollideCallBack whatever and a OnStart function at the top. You guys don't have it. It's a script here, and the function is... Somewhere!

I tried copying the Function of the script over to mine and set a point where it would be activated, no luck my duck I still got plucked...... the game didn't want to, and nothing happened.

If a working script could be provided HERE without me going on a adventure through your script files, that would be awesome.

Well I highly doubt anyone will do this and take time for it, but I'll wait... if I get no help, then I just scrap my map and throw it away.




RE: I need some Help. HARDCORE SCRIPT :P - xtron - 07-19-2011

Code:
void OnStart()
{
AddEntityCollideCallback("ParentName", "ChildName", "FunctionName", true, 1);
}

void FunctionName(string &in asParent, string &in asChild, int alState)
{
FadeOut(0)
AddTimer("", 1.0, "TimerName")
}

void TimerName(string &in asTimer)
{
TeleportPlayer("StartPosName");
}

This came out of the blue so I never tried it.



RE: I need some Help. HARDCORE SCRIPT :P - Angerpull - 07-19-2011

(07-19-2011, 02:36 AM)xtron Wrote:
Code:
void OnStart()
{
AddEntityCollideCallback("ParentName", "ChildName", "FunctionName", true, 1);
}

void FunctionName(string &in asParent, string &in asChild, int alState)
{
FadeOut(0)
AddTimer("", 1.0, "TimerName")
}

void TimerName(string &in asTimer)
{
TeleportPlayer("StartPosName");
}

This came out of the blue so I never tried it.

I see what you're trying to do. But I want the entire booming effect and all of that. Idk how to do it, and the Frictional Games HPS files is like a maze... made out of mirrors... in Harry Potter.


RE: I need some Help. HARDCORE SCRIPT :P - Tanshaydar - 07-19-2011

(07-19-2011, 02:18 AM)Angerpull Wrote: I just did... Made no effing sense in my eyes. I usually see the

AddCollideCallBack whatever and a OnStart function at the top. You guys don't have it. It's a script here, and the function is... Somewhere!

I tried copying the Function of the script over to mine and set a point where it would be activated, no luck my duck I still got plucked...... the game didn't want to, and nothing happened.

If a working script could be provided HERE without me going on a adventure through your script files, that would be awesome.

Well I highly doubt anyone will do this and take time for it, but I'll wait... if I get no help, then I just scrap my map and throw it away.

If you know how to use a Collide Callback, then you can search for the function's name since it's already stated in the Callback function. Open the map, you can search for area name. It's really easy, just takes a little clicking time.

And instead of waiting and wanting people to write code for you, trying to understand the script will help you in a long term.

PS. They are not my script files, I'm not a Frictional Games employee.


RE: I need some Help. HARDCORE SCRIPT :P - Angerpull - 07-19-2011

(07-19-2011, 02:46 AM)Tanshaydar Wrote:
(07-19-2011, 02:18 AM)Angerpull Wrote: I just did... Made no effing sense in my eyes. I usually see the

AddCollideCallBack whatever and a OnStart function at the top. You guys don't have it. It's a script here, and the function is... Somewhere!

I tried copying the Function of the script over to mine and set a point where it would be activated, no luck my duck I still got plucked...... the game didn't want to, and nothing happened.

If a working script could be provided HERE without me going on a adventure through your script files, that would be awesome.

Well I highly doubt anyone will do this and take time for it, but I'll wait... if I get no help, then I just scrap my map and throw it away.

If you know how to use a Collide Callback, then you can search for the function's name since it's already stated in the Callback function. Open the map, you can search for area name. It's really easy, just takes a little clicking time.

And instead of waiting and wanting people to write code for you, trying to understand the script will help you in a long term.

PS. They are not my script files, I'm not a Frictional Games employee.

Okay I found it.

Spoiler below!

OnStart blah blah
{
AddEntityCollideCallback("Player","TeleportToDarkSideArea", "CollideTeleportToDarkSide", true, 0);
}


void CollideTeleportToDarkSide(string &in asParent, string &in asChild, int alState)
{
FadeOut(0.3);

AddTimer("scare", 0.3f, "TimerPlayerReact");
AddTimer("breath", 2.0f, "TimerPlayerReact");
AddTimer("breathl", 4.0f, "TimerPlayerReact");
AddTimer("breathl", 6.0f, "TimerPlayerReact");

AddTimer("TeleportHowl", 0.5f, "TimerTeleportHowl");
AddTimer("TeleportDone", 3.5f, "TimerTelportDone");

PlaySoundAtEntity("stomp","scare_wall_stomp","Player", 0, false);
PlaySoundAtEntity("darkamb","07_amb_breath","Player", 5, true);
PlaySoundAtEntity("wateramb", "ambience_water_no3d.snt", "sound_idle_1", 5, true);

FadePlayerFOVMulTo(4.0f, 4.0f);
SetRadialBlurStartDist(0.1f);
FadeRadialBlurTo(1.0f, 5.0f);

StartEffectFlash(0.2, 0.1,0.3);

FadeGlobalSoundVolume(0, 0.3);
StopMusic(0.3f, 0);
StartScreenShake(0.1, 4.7, 0.05, 0.5);

FadePlayerFOVMulTo(0.5, 3);
}


So what do I do to remove the teleport? I am tired, and can't edit worth oklahoma.