Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Gametee


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nkmols' question
Author Message
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #11
RE: Forge to look at object script

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?
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);
}
(This post was last modified: 02-22-2011 09:28 PM by nkmol.)
02-22-2011 09:27 PM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #12
RE: Nkmols' question

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)
(This post was last modified: 02-22-2011 10:41 PM by nkmol.)
02-22-2011 10:40 PM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #13
RE: Nkmols' question

Got a new question again Tongue how could the brute hit the Cabinet like 2times? I have no idea which script i should use Confused
02-23-2011 04:55 PM
Find all posts by this user Quote this message in a reply
Tanshaydar Offline
From Beyond

Posts: 3,085
Joined: Mar 2009
Reputation: 67
Post: #14
RE: Nkmols' question

After 2 hits, deactivate it?

02-23-2011 07:16 PM
Visit this user's website Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #15
RE: Nkmols' question

(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
(This post was last modified: 02-23-2011 10:53 PM by nkmol.)
02-23-2011 09:46 PM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #16
RE: Nkmols' question

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.
02-24-2011 10:46 PM
Find all posts by this user Quote this message in a reply
Linus Ågren Offline
Senior Member

Posts: 309
Joined: Jan 2011
Reputation: 5
Post: #17
RE: Nkmols' question

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

Creator of The Dark Treasure.
02-24-2011 10:48 PM
Visit this user's website Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #18
RE: Nkmols' question

(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
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
<CATEGORY Name="Hints">
    <Entry Name="CabinetLocked">It's locked</Entry>
</CATEGORY>
(This post was last modified: 02-25-2011 05:31 PM by nkmol.)
02-25-2011 03:35 PM
Find all posts by this user Quote this message in a reply
nkmol Offline
Senior Member

Posts: 252
Joined: Feb 2011
Reputation: 4
Post: #19
RE: Nkmols' question

i cant find the problem of this message script Tongue someone knows the answer? Big Grin
02-27-2011 04:29 PM
Find all posts by this user Quote this message in a reply
Linus Ågren Offline
Senior Member

Posts: 309
Joined: Jan 2011
Reputation: 5
Post: #20
RE: Nkmols' question

I don't think you're going to have the brackets after the "else".
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);
}

Creator of The Dark Treasure.
02-27-2011 05:15 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)