Frictional Games Forum (read-only)
Nkmols' question - 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: Nkmols' question (/thread-6676.html)

Pages: 1 2 3


RE: Forge to look at object script - nkmol - 02-22-2011

an example, if the brute is in front of my cabine (pathnodearea_1) there is a script on that area (scriptArea_2) for sounds.
but when i put like react_breath.snt there is only 1 sound, that's not very long Tongue so how could i activate multiple sounds, different .ogg files, and not at one time?
Code:
void WalkLeave(string &in asTimer)
{
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", 5.0f, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", 3.0f, "");
    AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_3", 0.0f, "");
    AddEntityCollideCallback("servant_grunt_1", "ScriptArea_1", "Leaving", false, 1);
    AddEntityCollideCallback("servant_grunt_1", "ScriptArea_2", "Sound", true, 1);
}

void Sound(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("PlayerScared", "react_breath.snt", "Player", 0.0f, true);
}



RE: Nkmols' question - nkmol - 02-22-2011

Solved it already, feels stupid if i solve my self, sorry have to look better Tongue

Edited my react_breath.snt in notepad and saved as a new file.
putted Loop="true" and Random = "6" (i thought i needed that for the 6differents .ogg sounds, random play them)


RE: Nkmols' question - nkmol - 02-23-2011

Got a new question again Tongue how could the brute hit the Cabinet like 2times? I have no idea which script i should use :S


RE: Nkmols' question - Tanshaydar - 02-23-2011

After 2 hits, deactivate it?


RE: Nkmols' question - nkmol - 02-23-2011

(02-23-2011, 07:16 PM)Tanshaydar Wrote: After 2 hits, deactivate it?

well the brute should first walk to PathNodeArea_1 and the brute will stand there for a while. after that he needs to notice you and has to hit the cabinet for a couple of times. After that, he doesn't notice you anymore and he will go to the next path, PathNodeArea_2


RE: Nkmols' question - nkmol - 02-24-2011

Is there a script for setting detection of "Player" on true? So the monster that's spawned atm Will find you, even if your hidded.


RE: Nkmols' question - Linus Ågren - 02-24-2011

ShowEnemyPlayerPosition(string& asName);
asName = Name of monster Smile


RE: Nkmols' question - nkmol - 02-25-2011

(02-24-2011, 10:48 PM)junkfood2121 Wrote: ShowEnemyPlayerPosition(string& asName);
asName = Name of monster Smile
thnx!Big Grin
and how to get undetected? Tongue

edited: solved it whith adding a new grunt. but if anybody know a undetected script, feel free to reply Big Grin

but i got a new problem that doesn't want to work, i'm trying to add a message when i dont have the key for the cabinet (that's locked) :

.hps
Code:
void UsedKeyDoor(string &in asItem, string &in asEntity)
{
    if(HasItem("key_tower_1") == true)
    {
        SetSwingDoorLocked(asEntity, false, true);
        PlayGuiSound("unlock_door.snt", -1);
        GiveSanityBoost();
        RemoveItem("key_tower_1");
        AutoSave();
        
    }
    else
    {
        SetMessage("Hints", "CabinetLocked", -1);
    }
}

.lang
Code:
<CATEGORY Name="Hints">
    <Entry Name="CabinetLocked">It's locked</Entry>
</CATEGORY>



RE: Nkmols' question - nkmol - 02-27-2011

i cant find the problem of this message script Tongue someone knows the answer? Big Grin


RE: Nkmols' question - Linus Ågren - 02-27-2011

I don't think you're going to have the brackets after the "else".
Code:
void UsedKeyDoor(string &in asItem, string &in asEntity)
{
    if(HasItem("key_tower_1") == true)
    {
        SetSwingDoorLocked(asEntity, false, true);
        PlayGuiSound("unlock_door.snt", -1);
        GiveSanityBoost();
        RemoveItem("key_tower_1");
        AutoSave();
        
    }
    else SetMessage("Hints", "CabinetLocked", -1);
}