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
Another Problem
Gamemakingdude Offline
Senior Member

Posts: 470
Threads: 82
Joined: Nov 2010
Reputation: 9
#6
RE: Another Problem

PHP Code: (Select All)
////////////////////////////+
// Run first time starting map
void OnStart()
{
AddUseItemCallback("""Prisonkey_1""prison_1""usedkeyondoor"true);
AddEntityCollideCallback("Player""monster""MonsterStart"true1);
}
void usedkeyondoor(string &in asItemstring &in asEntity)
{
SetSwingDoorLocked("prison_1"falsetrue);
PlaySoundAtEntity("""unlock_door""prison_1"0false);
RemoveItem("Prisonkey_1");
}



void MonsterStart(string &in asParentstring &in asChildint alState)
{
SetEntityActive("servant_grunt_1"true);
AddEnemyPatrolNode("servant_grunt_1""endNode"9999.0f"");
AddEnemyPatrolNode("servant_grunt_1""PathNodeArea_5"9999.0f"");
}
////////////////////////////
// Run when entering map
void OnEnter()
{

}

////////////////////////////
// Run when leaving map
void OnLeave()
{



Always put your call backs in the onStart() Proc and not anywhere in the code!

Rep if like me or im helpful or you love my stories!
Stephanos house
10-07-2011, 12:18 AM
Find


Messages In This Thread
Another Problem - by jmayo - 10-05-2011, 11:46 PM
RE: Another Problem - by Tanshaydar - 10-06-2011, 12:05 AM
RE: Another Problem - by jmayo - 10-06-2011, 12:08 AM
RE: Another Problem - by Your Computer - 10-06-2011, 01:01 AM
RE: Another Problem - by jmayo - 10-07-2011, 12:16 AM
RE: Another Problem - by Gamemakingdude - 10-07-2011, 12:18 AM



Users browsing this thread: 2 Guest(s)