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
Message on locked doors
giacomo9 Offline
Junior Member

Posts: 37
Threads: 11
Joined: Nov 2012
Reputation: 0
#7
RE: Message on locked doors

In the lever editor ("PlayerEntityCallback" in this door where message should be).
And in script file (Here's all script. I used bold to show the script message)

////////////////////////////
// Run when starting map
void OnStart()
{
AddUseItemCallback("", "basementkey_1", "basement_1", "KeyOnDoor", true);
AddUseItemCallback("", "corridorkey", "corridor_1", "KeyOnDoor_2", true);
AddEntityCollideCallback("Player", "tp_1", "DeadOne", true, 1);
AddEntityCollideCallback("Player", "tp_2", "ColinBody", true, 1);
SetEntityCallbackFunc("corridorkey", "OnPickup");
AddEntityCollideCallback("stevie_1", "fade_1", "fade1", true, 1);
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("basement_1", false, true);
PlaySoundAtEntity("", "unlock_door", "basement_1", 0, false);
}




void DeadOne(string &in asParent, string &in asChild, int alStates)
{
SetEntityActive("GhostOne", true);
AddPropForce("GhostOne", 0, 0, -100000, "world");
PlaySoundAtEntity("", "24_iron_maiden.snt", "GhostOne", 0, false);
}




void ColinBody(string&in asParent, string &in asChild, int alStates)
{
SetEntityActive("ColinBody", true);
AddPropForce("ColinBody", 0, 0, 0, "world");
PlaySoundAtEntity("", "24_burn.snt", "ColinBody", 0, false);
}




void OnPickup(string &in asEntity, string &in type)
{
SetEntityActive("stevie_1", true);
AddEnemyPatrolNode("stevie_1", "PathNodeArea_1", 0.1, "");
AddEnemyPatrolNode("stevie_1", "PathNodeArea_2", 0.1, "");
AddEnemyPatrolNode("stevie_1", "PathNodeArea_3", 0.1, "");
AddEnemyPatrolNode("stevie_1", "PathNodeArea_4", 0.1, "");
AddEnemyPatrolNode("stevie_1", "PathNodeArea_5", 0.1, "");
}




void fade1(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("stevie_1", true);
}




void KeyOnDoor_2(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("corridor_1", false, true);
PlaySoundAtEntity("", "unlock_door", "corridor_1", 0, false);
}



void Messagedoor(string &in entity)


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

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

}
}
11-21-2012, 08:10 PM
Find


Messages In This Thread
Message on locked doors - by giacomo9 - 11-21-2012, 06:44 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 07:07 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 07:40 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 08:10 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 08:49 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 09:00 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 09:24 PM
RE: Message on locked doors - by The chaser - 11-21-2012, 09:38 PM
RE: Message on locked doors - by giacomo9 - 11-21-2012, 09:58 PM
RE: Message on locked doors - by The chaser - 11-21-2012, 10:53 PM



Users browsing this thread: 2 Guest(s)