04-16-2011, 03:30 PM
hi everyone
this is my first post here
anyway i am a noob at scripting.
so i hope you could help me.
i want this object to apear , but nothing happens.
i don't get an error when i start the level so i hope someone here knows what to do
this is the script:
this is my first post here
anyway i am a noob at scripting.
so i hope you could help me.
i want this object to apear , but nothing happens.
i don't get an error when i start the level so i hope someone here knows what to do
this is the script:
Code:
//===========================================
// Starter's Script File!
//===========================================
//===========================================
// This runs when the map first starts
void OnStart()
{ AddEntityCollideCallback("Player" , "ScriptArea_1" , "MonsterFunc1" , true , 1); PlayMusic("03_puzzle_secret.ogg", false , 1.0f, 0, 0, true);}
void MonsterFunc1(string &in asParent , string &in asChild , int alState)
{ SetEntityActive("character_infected_1" , true);
PlaySoundAtEntity( "", "react_pant.snt" ,"Player", 0.0f , false);
PlaySoundAtEntity( "", "explosion_rock_large.snt" ,"Player", 0.0f , false);
PlayMusic("00_event_gallery.ogg", false , 1.0f, 0, 0, true);}
//===========================================
// This runs when the player enters the map
void OnEnter()
{
AddUseItemCallback("", "R01_Key1", "mansion_1", "KeyOnDoor", true);
}
void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_1", false, true);
PlaySoundAtEntity("", "unlock_door.snt", "mansion_1", 0.0f, true); }
void CollideScriptArea_2(string &in asParent, string &in asChild, int alState)
{
AddEntityCollideCallback("Player" , "ScriptArea_2" , "MonsterFunc1" , true , 1);
SetEntityActive("hanging_prisoner_1", true);
SetLightVisible("SpotLight_1", true);
}
//===========================================
// This runs when the player leaves the map
void OnLeave()
{
}