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
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#7
RE: Help with combining scripts

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);
}


"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 05-24-2013, 12:48 PM by PutraenusAlivius.)
05-24-2013, 12:44 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 PutraenusAlivius - 05-24-2013, 12:44 PM
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: 1 Guest(s)