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
Grunt disappearing
naseem142 Offline
Member

Posts: 153
Threads: 19
Joined: Oct 2012
Reputation: 0
#8
RE: Grunt disappearing

(10-09-2012, 04:10 PM)Nemet Robert Wrote: void OnStart()

{

AddUseItemCallback("", "key_1", "locked_door1", "UsedKeyOnDoor", true);
AddEntityCollideCallback("Player", "explode_scare", "Explode", true, 1);
SetEntityCallbackFunc("key_1", "OnPickup");

}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("locked_door1", false, true);

PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);

RemoveItem("key_1");

}

void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("servant_grunt_1", true);
AddTimer("", 15.0f, "GruntDisable");
ShowEnemyPlayerPosition("servant_grunt_1");

}
void GruntDisable(string &in asTimer)
{
SetEntityActive("servant_grunt_1", false);
}

void DoorLockedPlayer(string &in entity)


{
if(GetSwingDoorLocked("gruntdoorss") == true)
{

SetMessage("Messages", "gruntdoor", 0);

}
}

//////////////////////////////////////////////////////////////////

void OnEnter()


{

AddUseItemCallback("", "trap", "locked_door1", "Trapitup", true);

SetEntityCallbackFunc("trap", "OnPickup1");

}

void Trapitup(string &in asItem, string &in asEntity)

{

SetSwingDoorLocked("locked_door1", false, true);

PlaySoundAtEntity("", "unlock_door.snt", "locked_door1", 0, false);

RemoveItem("trap");

}

void OnPickup1(string &in asEntity, string &in type)
{
SetEntityActive("1", true);
ShowEnemyPlayerPosition("1");
SetEntityActive("2", true);
ShowEnemyPlayerPosition("2");
SetEntityActive("3", true);
ShowEnemyPlayerPosition("3");
SetEntityActive("4", true);
ShowEnemyPlayerPosition("4");
SetEntityActive("5", true);
ShowEnemyPlayerPosition("5");

}


////////////////////////////////////////////////////////////////////////////////////


void Explode(string &in asParent, string &in asChild, int alState)
{
SetPropHealth("vase_1", 0);
SetPropHealth("vase_2", 0);
}

//////////////////////////////////////////////////////////////////////////////////////
thank you Angel
10-09-2012, 04:18 PM
Website Find


Messages In This Thread
Grunt disappearing - by naseem142 - 10-09-2012, 03:26 PM
RE: Grunt disappearing - by Robby - 10-09-2012, 03:30 PM
RE: Grunt disappearing - by Lizard - 10-09-2012, 03:34 PM
RE: Grunt disappearing - by naseem142 - 10-09-2012, 03:59 PM
RE: Grunt disappearing - by Robby - 10-09-2012, 04:06 PM
RE: Grunt disappearing - by naseem142 - 10-09-2012, 04:07 PM
RE: Grunt disappearing - by Robby - 10-09-2012, 04:10 PM
RE: Grunt disappearing - by naseem142 - 10-09-2012, 04:18 PM



Users browsing this thread: 1 Guest(s)