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 Script Box help
liquiddr3amz Offline
Junior Member

Posts: 14
Threads: 5
Joined: Nov 2012
Reputation: 0
#1
Question  Script Box help

I was curious on how to add sounds to play at certain areas like when you walk into a script box, basically so i can use a walking sound to make it sound like something is walking right behind you but each time you look nothing is there. if someone can show me how to make sounds activated by the box that would be great Smile
12-04-2012, 05:44 PM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#2
RE: Script Box help

Check out this site. http://wiki.frictionalgames.com/hpl2/amn..._functions
It might help you.

And for simple scripting, try watch some tutorials

Trying is the first step to success.
12-04-2012, 05:54 PM
Find
The chaser Offline
Posting Freak

Posts: 2,486
Threads: 76
Joined: Jun 2012
Reputation: 113
#3
RE: Script Box help

Simply:

AddEntityCollideCallback("Player", "Area", "Sound", true, 1);

void Sound (string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "Sound.snt", "SoundArea", 0.1, true);
}

THE OTHERWORLD (WIP)
[Image: k6vbdhu]

Aculy iz dolan.
12-04-2012, 05:59 PM
Find
liquiddr3amz Offline
Junior Member

Posts: 14
Threads: 5
Joined: Nov 2012
Reputation: 0
#4
RE: Script Box help

Thanks beecake ill be sure to check that out, and thanks chaser for the help as well (:
12-04-2012, 06:21 PM
Find
liquiddr3amz Offline
Junior Member

Posts: 14
Threads: 5
Joined: Nov 2012
Reputation: 0
#5
RE: Script Box help

void OnStart()

{
AddEntityCollideCallback("Player", "foot7", "step7", true, 1);

}

void Sound (string &in asParent, string &in asChild, int alState)

{
PlaySoundAtEntity("", "step_walk_wood.snt", "step7", 0.1, true);
}

NOTE; my script area is called foot7
my Sound name is step7

i RE ran the script using a differnt sound, what is happening is sound just gets activated befor i am even close to the script area, any reasons why?
(This post was last modified: 12-06-2012, 05:20 AM by liquiddr3amz.)
12-06-2012, 05:05 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#6
RE: Script Box help

Did you accidently place a sound-entity inside the level editor?

Trying is the first step to success.
12-06-2012, 06:49 AM
Find




Users browsing this thread: 1 Guest(s)