Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 5 Votes - 2.2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Escape Hell - Chapter 1 - DEMO RELEASED (Post Poned until further notice)
Author Message
cook Offline
Member

Posts: 103
Joined: Apr 2011
Reputation: 0
Post: #5
RE: Escape Hell (My First Custom Story) [WIP]

void onStart()
{
AddUseItemCallback("", "key_torture_chamber_1", "prison_section_1", "UsedKeyOnDoor", true);
AddUseItemCallback("", "Player", "script_area_2", "ActivateMonster", true);
AddEntityCollideCallback("servant_grunt_1", "monstergone_area", "MonsterGone", true, 1);
wakeUp();
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_1", "5.5f", "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_2", "0.0f", "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_4", "0.0f", "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_5", "0.0f", "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_6", "0.0f", "");
AddEnemyPatrolNode("servant_grunt_1", "PathNodeArea_9", "0.0f", "");//these have been added here because theres nothing to spawn servant_grunt_1, im assuming it starts off in the map
}

void wakeUp()
{
FadeOut(0); // Instantly fades the screen out. (Good for starting the game)
FadeIn(20); // Amount of seconds the fade in takes
FadeImageTrailTo(2, 2);
FadeSepiaColorTo(100, 4);
SetPlayerActive(false);
FadePlayerRollTo(50, 220, 220); // "Tilts" the players head
FadeRadialBlurTo(0.15, 2);
SetPlayerCrouching(true); // Simulates being on the ground
AddTimer("trig1", 11.0f, "beginStory"); // Change '11.0f' to however long you want the 'unconciousness' to last
}

void beginStory(string &in asTimer)
{
ChangePlayerStateToNormal();
SetPlayerActive(true);
FadePlayerRollTo(0, 33, 33); // Change all settings to defaults
FadeRadialBlurTo(0.0, 1);
FadeSepiaColorTo(0, 4);
SetPlayerCrouching(false);
FadeImageTrailTo(0,1);
}

void UsedKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("prison_section_1", false, true);
PlaySoundAtEntity("", "unlock_door", "prison_section_1", 0, false);
RemoveItem("key_torture_chamber_1");
}

void ActivateMonster(string &in asItem, string &in asEntity)
{
SetEntityActive(servant_grunt_2", true);
}

void MonsterGone(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke(servant_grunt_1", "false");
}

Any base callbacks, or callbacks that call other callbacks or go directly to a function are to be placed in the OnStart. There is nothing to spawn servant 1, not sure if thats intentional.
(This post was last modified: 05-18-2011 12:12 AM by cook.)
05-18-2011 12:08 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Escape Hell (My First Custom Story) [WIP] - cook - 05-18-2011 12:08 AM



User(s) browsing this thread: 1 Guest(s)