Frictional Games Forum (read-only)

Full Version: Can't get area script to work!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hellow I'm a new scripter and I really could need some help solving this problem. Confused
In my level editor I've made an area called "ScriptArea_1". When the player enters the area I want a barrel and a sound to appear, but whatever I do it wouldn't work!
Here's my script:
void onstart()
{
AddEntityCollideCallback("player", "ScriptArea_1", "appear", true, 1);
}
void appear(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "react_scare", "player", 0, false);
SetEntityActive("barrel02", true);
}
If anyone could help me I would be very appreciated!
void onstart()
should be named
void OnStart()
and might as well capitalise "player"
So it is "Player"
just in case
(07-04-2012, 12:14 PM)FastHunteR Wrote: [ -> ]void onstart()
should be named
void OnStart()
and might as well capitalise "player"
So it is "Player"
just in case
It worked! Thx! Finally I can continue my scripting Big Grin