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
Script Help Sounds and monster
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#1
Sounds and monster

Hey there,

I need help with some sounds and a monster.
Sounds:

On two parts of my map I need to play a sound.
First time:
void Break(string &in asParent, string &in asChild, int alState)
{
FadeInSound("break_wood_metal2.snt", 0, true);
GiveSanityDamage(5.0f, true);
SetEntityActive("enemy", true);
SetEntityActive("prison_section_3", false);
SetEntityActive("prison_section_5", true);
AddEnemyPatrolNode("enemy", "PathNodeArea_100", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_101", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_102", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_103", 2, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_104", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_105", 0.001, "Idle");
AddEnemyPatrolNode("enemy", "PathNodeArea_106", 0.001, "Idle");
}

I dont know if there I must write something else and not fade in...
Ingame no sound is coming.
And here is the problem with the enemy:
It becomes active, but it dont follows the path nodes.

Same prob. with the sound here:

void killall(string &in asParent, string &in asChild, int alState)
{
GiveSanityDamage(5.0f, true);
FadeInSound("20_event_darkness.snt", 0, true);
}

I think fade in sound is wrong, but i dont know what to do.

Thx for reading

No one knows, how "I" goes.
(This post was last modified: 03-14-2013, 08:49 PM by Knusper..)
03-14-2013, 08:49 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#2
RE: Sounds and monster

I would maybe try PlaySoundAtEntity or set fade in time to 0.001 . Because maybe the fadein needs a fade in time or something.

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-14-2013, 09:22 PM
Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#3
RE: Sounds and monster

thx for answer, but it dont works Sad

No one knows, how "I" goes.
03-14-2013, 09:45 PM
Find
NaxEla Offline
Senior Member

Posts: 415
Threads: 5
Joined: Dec 2012
Reputation: 28
#4
RE: Sounds and monster

break_wood_metal2.snt and 20_event_darkness.snt don't actually exist. Both those files have a .ogg extension. And also, as tonitoni1998 said, it's better to use PlaySoundAtEntity for playing sounds.

So for the sound, you would write:
PHP Code: (Select All)
PlaySoundAtEntity("""break_wood_metal.snt""Player"0false); //"Player" is the entity it's played at 

For the event music, use PlayMusic:
PHP Code: (Select All)
PlayMusic("20_event_darkness"false1010false); 

In Ruins [WIP]
03-14-2013, 10:10 PM
Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#5
RE: Sounds and monster

thx very much.
the sound event_darkness works now.
still i dont hear the other one, and the monster isnt following too.

edit:
ah, i now solved the problem with the monster, it saw me through a wall...

No one knows, how "I" goes.
(This post was last modified: 03-14-2013, 10:29 PM by Knusper..)
03-14-2013, 10:24 PM
Find
ingedoom Offline
Member

Posts: 120
Threads: 12
Joined: Feb 2012
Reputation: 0
#6
RE: Sounds and monster

(03-14-2013, 10:24 PM)Knusper. Wrote: thx very much.
the sound event_darkness works now.
still i dont hear the other one, and the monster isnt following too.

edit:
ah, i now solved the problem with the monster, it saw me through a wall...

Hi. In the level edit or you can uncheck something at the monster entity so he won't react and start chasing you. So that you can inspect your map without worrying about being murdered....

[Image: 23778.png]
03-15-2013, 02:38 PM
Website Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#7
RE: Sounds and monster

i said the monster problem is solved.
still the sound dont works

No one knows, how "I" goes.
03-15-2013, 02:51 PM
Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#8
RE: Sounds and monster

strangely the monster doesn't work anymore and the sound isn't there, too.
I tried very much but it don't work.

Maybe you could try it, here is the map folder:
http://speedy.sh/UdJdV/tests.zip


I really can't find the mistake.

I need:
playing the sound at the area it should load and the monster should go like the path nodes show.

No one knows, how "I" goes.
03-19-2013, 05:03 PM
Find
ingedoom Offline
Member

Posts: 120
Threads: 12
Joined: Feb 2012
Reputation: 0
#9
RE: Sounds and monster

which monster?? there are like 100...

enemy_suitor_5 right?

I have the answer dude.
PHP Code: (Select All)
void follow(string &in asParentstring &in asChildint alState){    
SetEntityActive("enemy_suitor_5"true);    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_100"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_101"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_102"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_103"2"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_104"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_105"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_106"0.001"Idle");    
AddEnemyPatrolNode("servant_brute_5""PathNodeArea_110"0.001"Idle");} 


You wrote servant_brute_5. It's the enemy_suitor_5. Wink

[Image: 23778.png]
(This post was last modified: 03-20-2013, 12:54 AM by ingedoom.)
03-20-2013, 12:37 AM
Website Find
Knusper. Offline
Member

Posts: 58
Threads: 7
Joined: Feb 2013
Reputation: 2
#10
RE: Sounds and monster

now it works, thx.
BUT the sound still doesnt work.

No one knows, how "I" goes.
03-20-2013, 12:45 PM
Find




Users browsing this thread: 2 Guest(s)