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
Ending A custom story
XeOnTricks Offline
Junior Member

Posts: 27
Threads: 12
Joined: Feb 2017
Reputation: 0
#5
RE: Ending A custom story

(04-06-2017, 09:19 PM)Mudbill Wrote: What's the crash? What's the script? We may be script wizards but we can't do magic. You gotta give us something to go on if we are to help you. Help us help you, you know?

void OnStart()
{
PlayMusic("01_amb_darkness.ogg", true, 0.9, 0, 1, false);

SetEntityPlayerInteractCallback("Bedroom_1", "DoorMessage_1", false);

SetEntityPlayerInteractCallback("Bedroom_2", "DoorMessage_2", false);

SetEntityPlayerInteractCallback("Bedroom_3", "DoorMessage_3", false);

SetEntityPlayerInteractCallback("MasterBed_1", "DoorMessage_4", false);

SetEntityPlayerInteractCallback("StorageDoor_1", "DoorMessage_5", false);

SetEntityPlayerInteractCallback("Kitchen", "DoorMessage_6", false);

AddUseItemCallback("", "Key_2", "Masterbed_1", "KeyFunc", true);

AddEntityCollideCallback("Player", "SuitorArea_1", "EnemySpawn", false, 1);

AddEntityCollideCallback("Player", "MonsterArea_1", "EnemySpawn_1", false, 1);

AddUseItemCallback("", "Key_3", "mansion_9", "DoorKey", true);

AddEntityCollideCallback("Player", "AreaCollide_1", "Message", true, 1);

AddUseItemCallback("", "Key_4", "StorageDoor_1", "UnlockDoor", true);

AddEntityCollideCallback("Player", "MonsterArea", "Monster", true, 1);
}




void Monster(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Monster", true);

ShowEnemyPlayerPosition("Player");
}




void UnlockDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);

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

RemoveItem("Key_4");
}





void Message(string &in asParent, string &in asChild, int alState)
{
AddQuest("Journal", "Memento");
}




void DoorKey(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);

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

RemoveItem("Key_3");
}




void EnemySpawn_1(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Demon_1", true);

ShowEnemyPlayerPosition("Player");
}




void EnemySpawn(string &in asParent, string &in asChild, int alState)
{
SetEntityActive("Suitor_1", true);

ShowEnemyPlayerPosition("Player");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_1", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_2", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_3", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_4", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_5", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_6", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_7", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_8", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_9", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_10", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_11", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_12", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_13", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_14", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_15", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_16", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_17", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_18", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_19", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_20", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_21", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_22", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_23", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_24", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_25", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_26", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_27", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_28", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_29", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_30", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_31", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_32", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_33", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_34", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_35", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_36", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_37", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_38", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_39", 0.001f, "");

AddEnemyPatrolNode("Suitor_1", "PathNodeArea_40", 0.001f, "");
}




void DoorMessage_1(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_1", 0.00f);
}


void DoorMessage_2(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_2", 0.00f);
}


void DoorMessage_3(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_3", 0.00f);
}


void DoorMessage_4(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_4", 0.00f);
}


void DoorMessage_5(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_5", 0.00f);
}


void DoorMessage_6(string &in asEntity)
{
SetMessage("Messages", "DoorEntry_6", 0.00f);
}




void KeyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);

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

RemoveItem("Key_2");
}




void OnEnter()
{



}




void OnLeave()
{

StartCredits("ending_alexander.ogg", "Messages", "EndDemo", 1);

}


FATAL ERROR: Could not load script file ''
custom_stories/MyLastWords/maps/MyLastWords.hps'!
main (241, 6) : ERR : No matching signatures to 'StartCredits(string@%,
string@&, string@&, const uint)'
(This post was last modified: 04-07-2017, 11:50 AM by XeOnTricks.)
04-07-2017, 11:44 AM
Find


Messages In This Thread
Ending A custom story - by XeOnTricks - 04-06-2017, 03:16 AM
RE: Ending A custom story - by Romulator - 04-06-2017, 12:23 PM
RE: Ending A custom story - by XeOnTricks - 04-06-2017, 07:25 PM
RE: Ending A custom story - by Mudbill - 04-06-2017, 09:19 PM
RE: Ending A custom story - by XeOnTricks - 04-07-2017, 11:44 AM
RE: Ending A custom story - by Mudbill - 04-07-2017, 04:12 PM
RE: Ending A custom story - by XeOnTricks - 04-07-2017, 11:03 PM
RE: Ending A custom story - by Mudbill - 04-08-2017, 04:20 AM
RE: Ending A custom story - by XeOnTricks - 04-08-2017, 06:31 PM
RE: Ending A custom story - by Mudbill - 04-09-2017, 11:09 PM



Users browsing this thread: 5 Guest(s)