Frictional Games Forum (read-only)
HELP!!! - 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: HELP!!! (/thread-14851.html)

Pages: 1 2 3 4


RE: HELP!!! - Putmalk - 04-17-2012

I'm sorry I don't quite understand your question.



RE: HELP!!! - JPPSJ - 04-17-2012

(04-17-2012, 01:14 AM)Putmalk Wrote: I'm sorry I don't quite understand your question.
Ok, i wont copy it. but is this the format?
void OnStart()
{
//player collide with slamdoor
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{
//slam door, with sound, effect, and sanity damage
SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}





RE: HELP!!! - Putmalk - 04-17-2012

Yes, that looks correct at a glance. If you get an error, it's probably a random syntax error, you will have to fix them and get used to debugging, everyone has to do it. Smile

You'll get the hang of this.



RE: HELP!!! - JPPSJ - 04-17-2012

(04-17-2012, 01:18 AM)JPPSJ Wrote:
(04-17-2012, 01:14 AM)Putmalk Wrote: I'm sorry I don't quite understand your question.
Ok, i wont copy it. but is this the format?
void OnStart()
{
//player collide with slamdoor
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{
//slam door, with sound, effect, and sanity damage
SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}
Do i have to open the door in the editor???




RE: HELP!!! - Putmalk - 04-17-2012

Again, I don't understand. When you place the door, it should be in the closed position. If you want, there's a value you can set in the editor that opens the door (it won't update in the editor, but will open in the game).



RE: HELP!!! - JPPSJ - 04-17-2012

(04-17-2012, 01:33 AM)Putmalk Wrote: Again, I don't understand. When you place the door, it should be in the closed position. If you want, there's a value you can set in the editor that opens the door (it won't update in the editor, but will open in the game).

It didnt work! this is what i used...
void OnStart()
{
AddEntityCollideCallback("Player", "AreaSlamDoor", "SlamDoor", true, 0);
}

void OnEnter()
{

}

void OnLeave()
{

}

void SlamDoor(string &in asParent, string &in asChild, int alState)
{

SetSwingDoorLocked("mansion_1", true, true);
GiveSanityDamage(10, true);
PlaySoundAtEntity("doorslam", "15_slam_door.snt", "mansion_1", 0.4f, false);
}




RE: HELP!!! - Putmalk - 04-17-2012

Describe to me the error.

Was it a crash error?

Did nothing happen when you went into the area?

Did anything in the SlamDoor function play? (a sound, sanity damage?)



RE: HELP!!! - JPPSJ - 04-17-2012

(04-17-2012, 01:45 AM)Putmalk Wrote: Describe to me the error.

Was it a crash error?

Did nothing happen when you went into the area?

Did anything in the SlamDoor function play? (a sound, sanity damage?)

i walked through the area and nothing happend. just like all my other attempts.





RE: HELP!!! - Putmalk - 04-17-2012

Are your areas properly named?

In the editor, is it called AreaSlamDoor and mansion_1?



RE: HELP!!! - JPPSJ - 04-17-2012

(04-17-2012, 02:02 AM)Putmalk Wrote: Are your areas properly named?

In the editor, is it called AreaSlamDoor and mansion_1?

WAit, does the caps need to be correct??