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? - Rownbear - 05-16-2011

How do I get a lever to be stuck when it's pushed to the position that's correct? please help Smile


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

SetLeverStuckState(string& asName, int alState, bool abEffects);

SetLeverStuckState("Lever", 1, true);


RE: Anyone need help? - Rownbear - 05-16-2011

(05-16-2011, 12:17 PM)Kyle Wrote: SetLeverStuckState(string& asName, int alState, bool abEffects);

SetLeverStuckState("Lever", 1, true);
Thanks! Big Grin


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

I kind of need help.. :o Though posted a new thread, should be like right below this one, would be really glad if you maybe have a solution for it :o


RE: Anyone need help? - Ge15t - 05-17-2011

Silly question, but how would I set out a death hint in the .lang file? As well as set up a script so that the game closes after death (ala Justine)


RE: Anyone need help? - Rownbear - 05-17-2011

Bumping Post #114, Page 12 Big Grin


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

(05-17-2011, 11:02 AM)Rownbear Wrote: Bumping Post #114, Page 12 Big Grin

Is there an error report? Tell me exactly what isn't working and what is.


RE: Anyone need help? - Rownbear - 05-17-2011

(05-17-2011, 11:27 AM)Kyle Wrote:
(05-17-2011, 11:02 AM)Rownbear Wrote: Bumping Post #114, Page 12 Big Grin

Is there an error report? Tell me exactly what isn't working and what is.
It's not an error report but it seems like the function cant change entities like the doors, play a sound AND set the monster active. So when I pick up the key nothing happens. Maybe I have a spelling error or I cant do it this way. So maybe I can use a timer when I pick up the key to set the things to happen instead. If it won't activate by just picking it up.

EDIT: It worked before when it was a script when the player walked into, So I think the function isn't right. But having the player walk into it wasn't what I wanted.


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

This was your script:

Code:
void OnStart()
{
SetEntityPlayerInteractCallback("castle_key_1", "MonsterActivate3", true);
}

void MonsterActivate3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", true);
SetEntityActive("castle_door_5", false);
SetEntityActive("castle_door_6", true);
SetSwingDoorLocked("castle_door_3", false, true);
PlaySoundAtEntity("LookAt_2", "15_bang.snt", "LookAt_2", 0, false);
PlaySoundAtEntity("guardian_distant3", "enabled.snt", "Player", 0,false);
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("servant_grunt_3", "PathNodeArea_5", 0, "");
}

When I look at it, I see many errors. Tongue

It should look like this:

Code:
void OnStart()
{
SetEntityPlayerInteractCallback("castle_key_1", "MonsterActivate3", true);
}
void MonsterActivate3(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("servant_grunt_3", true);
SetEntityActive("castle_door_5", false);
SetEntityActive("castle_door_6", true);
SetSwingDoorLocked("castle_door_3", false, true);
PlaySoundAtEntity("", "15_bang.snt", "LookAt_2", 0, false);
PlaySoundAtEntity("", "enabled.snt", "Player", 0, false);
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("", "servant_grunt_3", "PathNodeArea_5", 0, "");
}



RE: Anyone need help? - Rownbear - 05-17-2011

Oh well thanks for the reply, I used a different method though, When I pick up the key it uses a timer to set a script active in which you stand in, which then sets off monsteractivate3. Oh well not the most pretty function but hey, whatever works xD