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
I have a problem with my script
Harrjannk Offline
Junior Member

Posts: 4
Threads: 1
Joined: Feb 2012
Reputation: 0
#1
I have a problem with my script

Hey,
First thing: My English is bad. I hope you will understand me. Smile
I'm new here and I'm currently working on my first custom story.
I tried, to make an area, where a sound would play, when the player walks into another area, but it doesn't work. When I walk into the area, nothing happens. I tried to solve it, but I can't see what's the problem. Huh
Heres my script:

Quote: void OnStart()
{
AddEntityCollideCallback("Player", "ActivateLurker", "StartSound", true, 1);
}

void StartSound(string &in Entity)
{
PlaySoundAtEntity("StartSound", "water_lurker_idle.snt", "LurkerSound", 0, false);
}
(This post was last modified: 02-05-2012, 02:51 PM by Harrjannk.)
02-05-2012, 01:55 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#2
RE: I have a problem with my script

In wiki: http://wiki.frictionalgames.com/hpl2/amn..._functions

When I search for AddEntityCollideCallback, then syntax says: void MyFunc(string &in asParent, string &in asChild, int alState), not (string &in Entity)

The Interrogation
Chapter 1

My tutorials
02-05-2012, 02:05 PM
Find
Harrjannk Offline
Junior Member

Posts: 4
Threads: 1
Joined: Feb 2012
Reputation: 0
#3
RE: I have a problem with my script

What a stupid mistake. Dodgy
Thanks, it helps. Big Grin
02-05-2012, 02:50 PM
Find
Elven Offline
Posting Freak

Posts: 862
Threads: 37
Joined: Aug 2011
Reputation: 26
#4
RE: I have a problem with my script

No Problem Smile!

The Interrogation
Chapter 1

My tutorials
02-05-2012, 02:55 PM
Find




Users browsing this thread: 1 Guest(s)