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
Help with combining scripts
Wank Offline
Junior Member

Posts: 28
Threads: 11
Joined: May 2013
Reputation: 0
#8
RE: Help with combining scripts

(05-24-2013, 12:44 PM)JustAnotherPlayer Wrote:
Spoiler below!

void OnStart()
{
AddEntityCollideCallback("Player", "scr_spawnEnemy1", "SpawnEnemy1", true, 1);
AddUseItemCallback("", "key_study_one", "mansion_3", "UseKeyOnDoor", true);
}

void SpawnEnemy1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Enemy1", true);
AddEnemyPatrolNode("Enemy1", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("Enemy1", "PathNodeArea_6", 0, "");
}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("mansion_3", false, true);
PlaySoundAtEntity("", "unlock_door", "mansion_3", 0, false);
RemoveItem(asItem);
}


Thank you, this worked!
05-24-2013, 11:09 PM
Find


Messages In This Thread
Help with combining scripts - by Wank - 05-24-2013, 01:22 AM
RE: Help with combining scripts - by Tomato Cat - 05-24-2013, 01:34 AM
RE: Help with combining scripts - by Wank - 05-24-2013, 03:20 AM
RE: Help with combining scripts - by Wank - 05-24-2013, 12:06 PM
RE: Help with combining scripts - by Tomato Cat - 05-24-2013, 03:26 AM
RE: Help with combining scripts - by Wank - 05-24-2013, 11:09 PM
RE: Help with combining scripts - by Wooderson - 05-24-2013, 11:18 PM



Users browsing this thread: 2 Guest(s)