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 Help with scripting!
Hatred Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2012
Reputation: 1
#3
RE: Help with scripting!

Here it is!

////////////////////////////
// Run first time starting map
void OnStart()
{
PlayMusic("02_amb_safe", true, 0.7f, 1, 0, true);
SetEnemyIsHallucination("Morso1", 2);
SetEntityCallbackFunc("guiding_rod01_1", "ActivateMonster", true);
AddUseItemCallback("", "key_study_1", "mansion_4", "UsedKeyOnDoor", true);
AddUseItemCallback("", "hollow_needle_1", "mansion_2", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "Area2", "CollideArea2", true, 1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_4", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_4", 0, false);
RemoveUseItem("key_study_1");
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_2", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_2", 0, false);
RemoveUseItem("hollow_needle_1");
}

void CollideArea2("Player", "Area2", 1)
{
SetSwingDoorClosed("mansion_2", true, true);
}

void ActivateMonster(string &in Item)
{
SetEntityActive("Morso2", true);
AddEnemyPatrolNode("Morso2", "PathNodeArea_1", 0, "Idle");
AddEnemyPatrolNode("Morso2", "PathNodeArea_2", 0, "Idle");
AddEnemyPatrolNode("Morso2", "PathNodeArea_3", 0, "Idle");
AddEnemyPatrolNode("Morso2", "PathNodeArea_4", 0, "Idle");
AddEnemyPatrolNode("Morso2", "PathNodeArea_5", 0, "Idle");
AddEnemyPatrolNode("Morso2", "PathNodeArea_6", 0, "Idle");
}


////////////////////////////
// Run when entering map
void OnEnter()
{
}
////////////////////////////
// Run when leaving map
void OnLeave()
{
}
02-12-2012, 11:32 AM
Find


Messages In This Thread
Help with scripting! - by Hatred - 02-12-2012, 11:25 AM
RE: Help with scripting! - by flamez3 - 02-12-2012, 11:30 AM
RE: Help with scripting! - by Hatred - 02-12-2012, 11:32 AM
RE: Help with scripting! - by flamez3 - 02-12-2012, 11:53 AM
RE: Help with scripting! - by Hatred - 02-12-2012, 12:08 PM
RE: Help with scripting! - by flamez3 - 02-12-2012, 12:26 PM
RE: Help with scripting! - by Linus Ågren - 02-12-2012, 12:33 PM
RE: Help with scripting! - by Your Computer - 02-12-2012, 06:07 PM
RE: Help with scripting! - by Hatred - 02-12-2012, 08:56 PM



Users browsing this thread: 1 Guest(s)