Frictional Games Forum (read-only)
Anyone need 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 (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Anyone need help? (/thread-7825.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22


RE: Anyone need help? - Kyle - 05-19-2011

(05-19-2011, 11:10 PM)DannieWest Wrote: Gosh, how did I manage to scroll past it? ;o Well, thanks anyway ^^

You're welcome. Smile


RE: Anyone need help? - DannieWest - 05-20-2011

Oh btw, is there any way of making the player react as when sanity is ... and he falls to the floor all f*ed up, without the ringing nor falling to the floor? :o Just blurry and when turning around the camera is a lil after you know :o


RE: Anyone need help? - Wonderbread - 05-20-2011

(05-19-2011, 02:29 AM)Kyle Wrote:
(05-19-2011, 01:43 AM)Wonderbread Wrote: One more quick question.. how would I make it so a grunt is spawned when I enter a area only if I have a certain item?

Try this:

Code:
void OnStart()
{
     AddEntityCollideCallback("Player", "ScriptArea_1", "Func01", true, 1);
}
void Func01(string &in asParent, string &in asChild, int alState)
{
     if (HasItem("ItemName") == true)
     {
          SetEntityActive("MonsterName", true);
          return;
     }
}

The event isn't triggered when I step into the area when I have the item, also every key I pick up is names Machine Room Key and not the name I specified in the Extra_English.lang file, I think this may be part of the problem. Here's my code:

Code:
AddUseItemCallback("", "key_study_1", "mansion_2", "UseKey1", true);

AddEntityCollideCallback("Player" , "MonsterArea_1a" , "CollideMonsterArea_1a" , true , 1);

void CollideMonsterArea_1a(string &in asParent , string &in asChild , int alState)
{
    if (HasItem("key_study_1") == true)
    {
        SetEntityActive("servant_grunt_1" , true);
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_10a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_11a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_12a", 0, "");
        AddEnemyPatrolNode("servant_grunt_1", "MonsterPath_13a", 0, "");
}
}

Also, my monster stops at every pathnode for a couple seconds. I assumed where the 0 is above was how long the monster stays at a node but he stills sits there for a while before moving on..

Sorry for all the questions Tongue This is my last one haha


RE: Anyone need help? - Streetboat - 05-20-2011

I have a question. I want to make it so that when a door is closed, a light goes on, and any other time, it's off. Simple as that. However, I can't find anywhere if "OnClosed" is a type (like OnPickup, OnIgnite, etc.)

Here's my script:
Code:
void stoveopen(string &in asItem, string &in asEntity)
    {
    if(asType == "OnClosed")
        {
        SetLightVisible("PointLight_9", true);
        }
    else
        {
        SetLightVisible("PointLight_9", false);
        }
    }

It gives me an error saying that type is not defined. Help?

(For anyone curious, this script isn't a necessary one, it's an eyecandy one. It tells the game to turn on a small pointlight within a stove (the ones with the slotted doors that open) whenever the door is closed, and this pointlight is tied to a bunch of billboards. When the door is closed, the billboards turn on, and shine through the slots. If it works, it'll be beautiful. Big Grin)


RE: Anyone need help? - Kyle - 05-20-2011

(05-20-2011, 06:06 AM)Streetboat Wrote: I have a question. I want to make it so that when a door is closed, a light goes on, and any other time, it's off. Simple as that. However, I can't find anywhere if "OnClosed" is a type (like OnPickup, OnIgnite, etc.)

Here's my script:
Code:
void stoveopen(string &in asItem, string &in asEntity)
    {
    if(asType == "OnClosed")
        {
        SetLightVisible("PointLight_9", true);
        }
    else
        {
        SetLightVisible("PointLight_9", false);
        }
    }

It gives me an error saying that type is not defined. Help?

(For anyone curious, this script isn't a necessary one, it's an eyecandy one. It tells the game to turn on a small pointlight within a stove (the ones with the slotted doors that open) whenever the door is closed, and this pointlight is tied to a bunch of billboards. When the door is closed, the billboards turn on, and shine through the slots. If it works, it'll be beautiful. Big Grin)

I see what you're trying to do. Try this:

Code:
void OnStart()
{
     SetEntityConnectionStateChangeCallback("DoorName", "stoveopen");
}
void stoveopen(string &in asEntity, int alState)
{
     if (alState == 1)
     {
          SetLampLit("LightName", true, true);
          AddTimer("", 5, "TimerFunc");
     }
}
void TimerFunc(string &in asTimer)
{
     SetLampLit("LightName", false, true);
}



RE: Anyone need help? - Streetboat - 05-20-2011

Didn't work. Sad It doesn't crash, though... but it doesn't do anything.


RE: Anyone need help? - Kyle - 05-20-2011

(05-20-2011, 07:01 PM)Streetboat Wrote: Didn't work. Sad It doesn't crash, though... but it doesn't do anything.

Are you naming everything correctly? :/


RE: Anyone need help? - Streetboat - 05-20-2011

Yeah, I was. It's okay though, I found a workaround. The fruits of your labors:
[Image: Amnesia11.jpg]
[Image: Amnesia10.jpg]


RE: Anyone need help? - Wonderbread - 05-20-2011

Hey kyle, just wondering if you saw my question above. Its the last of my problems and Ill be done. Thanks


RE: Anyone need help? - Kyle - 05-20-2011

Try this. Click on the key in the editor and go to it's properties. At the bottom, under "CustomSubItemTypeName", and type the name you want from the .lang file for the key to use.