The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Triggering Sounds & Sanity Damage?
JenniferOrange Offline
Senior Member

Posts: 424
Threads: 43
Joined: Jun 2011
Reputation: 33
#1
Triggering Sounds & Sanity Damage?

So I'm progressing on my map well, but I want the player to walk through an archway, (not a door) and have it trigger a brute sound as well as give Daniel some sanity damage with effects.(screen stretch and boom noise) By the way, I don't want a monster to come out, I just want the player to hear the noise and get scared. (A monster hasn't been placed anywhere on my map.) I have been trying for a while now, fixing errors and such. The best I get is, when starting the map, the brute noise plays although I've put it in the archway and NOT in the player start area. -.- I put a script box there too. I also can't get my key to work on the other door. wtf.. here's my entire script. Fix any errors, please?

void onstart()
{
AddUseItemCallback("", "key_1", "mansion_1", "UsedKeyOnDoor", true);
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_1", 0, false);
RemoveItem("key_1");
}

void onenter()
{
AddEntityCollideCallback("Player", "monsterscare1", "CollideAreaTest01", true, 1);

}

void CollideAreaTest01(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "enabled.snt", "wall_door_way02_3", 6.0f, false);
GiveSanityDamage(30, true);
}

**(key_1 is the name I named my key. mansion_1 is the name of the door I want to use the key on. monsterscare1 is the name of the script area I put along with the sound. wall_door_way02_3 is the name of the archway I want to use as an entity to trigger the sound.)**
I can tell something isn't right.. anyone help me out here? Thanks.

P.S. Anyone know how to make a text thing appear when the player looks at something? Like, the player looks at a broken window and a message says on the screen: "I wonder what happened here.." kind of like thoughts?

P.S.S. Anyone know how to work the level doors too? Lol, I'm a newbie. I know you just make a new map and put the name of it under the door's entity tab where it says new map. Just don't know how to have the TextEntry appear..

Ba-da bing, ba-da boom.
(This post was last modified: 06-23-2011, 10:56 PM by JenniferOrange.)
06-23-2011, 10:46 PM
Find


Messages In This Thread
Triggering Sounds & Sanity Damage? - by JenniferOrange - 06-23-2011, 10:46 PM



Users browsing this thread: 1 Guest(s)