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

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Please!
Author Message
EthanLancaster Offline
Junior Member

Posts: 15
Joined: Mar 2012
Reputation: 0
Post: #1
Script Help Please!
I have been trying to make it to were you get in an elevator and it automatically puts you in the next map. I have been looking at the script all day and I cant find the error. There is no error message. It doesnt do anything. Please help!

void OnStart ()
{
AddUseItemCallback("", "OldWineCellarKey", "metal_4", "KeyOnDoor", true);
}

void scareactivate2(string &in asParent , string &in asChild , int alState)
{

SetEntityActive("Monster 1" , true);
AddEnemyPatrolNode("Monster 1", "PathArea_1", 0.0f, "true");
}

void KeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("metal_4", false, true);
PlaySoundAtEntity("", "unlock_door", "metal_4", 1, false);
RemoveItem("OldWineCellarKey");
GiveSanityBoostSmall();
PlayGuiSound("react_breath_slow", 0.5f);
}

void toalone_in_the_dark_cellar(string &in asParent, string &in asChild, int alState)
{
ChangeMap("alone_in_the_dark_cellar.map", "from_02", "", "");
}

void OnLeave()
{
SetupLoadScreen("LoadingText", "alone_in_the_dark_1st_floor", 0, "alone_in_the_dark_1st_floor.jpg");
}
04-01-2012 07:39 PM
Find all posts by this user Quote this message in a reply
Putmalk Offline
Senior Member

Posts: 275
Joined: Apr 2012
Reputation: 15
Post: #2
RE: Script Help Please!
How does this work? Is there supposed to be an area collide that's supposed to activate the toalone_in_the_dark_cellar function? Or does that occured after you hit a switch or something?
04-01-2012 07:45 PM
Find all posts by this user Quote this message in a reply
Strembitsky Offline
Member

Posts: 243
Joined: Feb 2012
Reputation: 3
Post: #3
RE: Script Help Please!
You don't have a callback to initiate the toalone_in_the_dark_cellar function.

The Nightmares v1.0 - Dreadful Fires WIP
04-01-2012 08:17 PM
Find all posts by this user Quote this message in a reply
Putmalk Offline
Senior Member

Posts: 275
Joined: Apr 2012
Reputation: 15
Post: #4
RE: Script Help Please!
(04-01-2012 08:17 PM)Strembitsky Wrote:  You don't have a callback to initiate the toalone_in_the_dark_cellar function.
Pretty much this,
AddEntityCollideCallback("Player", "Area_Elevator", string& "toalone_in_the_dark_cellar", false, 1);

Try something like that in your OnStart() function! Good luck!
04-01-2012 08:27 PM
Find all posts by this user Quote this message in a reply
Post Reply 




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