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
I need help with my Custom Story!
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#11
RE: I need help with my Custom Story!

(03-22-2014, 04:48 AM)valetheimpaler Wrote: hmmmmmmmmmmmmm
post your current code

void OnStart()
{
SetPlayerActive(false);
FadeOut(0);
//FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("activate_player", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
SetPlayerSanity(50);
AddUseItemCallback("OpenDoor", "MedicalKey", "level_wood_1", "UnlockLevelDoor", true);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void UnlockLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
GiveSanityBoostSmall();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnLeave()
{
SetupLoadScreen("Loading","LoadScreen1",0,"LoadScreenImage1.jpg");
}
////////////////////////////////////////////////////////////////////////////////////////
void FadeIn(string &in timer_name)
{
FadeIn(2);
AddTimer("Start", 2, "WakeUp");
}
void WakeUp(string &in timer_name)
{
if (timer_name == "Start")
{
SetLightVisible("Box_Light_1", true);
AddTime("MoveHead", 1, "WakeUp");
}
else if (timer_name == "MoveHead")
{
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
}
AddTimer("ActivatePlayer", 2, "WakeUp");
else if (timer_name == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}
03-22-2014, 04:49 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#12
RE: I need help with my Custom Story!

k, one sec

void OnStart()
{
SetPlayerActive(false);
FadeOut(0);
//FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("activate_player", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
SetPlayerSanity(50);
AddUseItemCallback("OpenDoor", "MedicalKey", "level_wood_1", "UnlockLevelDoor", true);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void UnlockLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
GiveSanityBoostSmall();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnLeave()
{
SetupLoadScreen("Loading","LoadScreen1",0,"LoadScreenImage1.jpg");
}
////////////////////////////////////////////////////////////////////////////////////////
void FadeIn(string &in asTimer)
{
string x = asTimer;

if(x == "activate_player")
FadeIn(2);
AddTimer("Start", 2, "WakeUp");
}
/////////////////////////////////////////////////////////////////////////////////////////
void WakeUp(string &in asTimer)
{

string x = asTimer;

if (x == "Start")
{
SetLightVisible("Box_Light_1", true);
AddTime("MoveHead", 1, "WakeUp");
}
else if (x == "MoveHead")
{
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}
else if (x == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}

try that. if it still crashes, upload the error message again

and you put the bracket in the wrong spot, for one. i meant the line RIGHT BEFORE the timer else if x ++ activate player
(This post was last modified: 03-22-2014, 04:58 AM by Vale.)
03-22-2014, 04:50 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#13
RE: I need help with my Custom Story!

(03-22-2014, 04:50 AM)valetheimpaler Wrote: k, one sec

void OnStart()
{
SetPlayerActive(false);
FadeOut(0);
//FadePlayerRollTo(65, 20, 20);
MovePlayerHeadPos(-1, -0.45, -1.1, 20, 1);
AddTimer("activate_player", 3, "FadeIn");
SetLightVisible("BoxLight_1", false);
SetPlayerSanity(50);
AddUseItemCallback("OpenDoor", "MedicalKey", "level_wood_1", "UnlockLevelDoor", true);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void UnlockLevelDoor(string &in asItem, string &in asEntity)
{
SetLevelDoorLocked(asEntity, false);
PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
RemoveItem(asItem);
GiveSanityBoostSmall();
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
void OnLeave()
{
SetupLoadScreen("Loading","LoadScreen1",0,"LoadScreenImage1.jpg");
}
////////////////////////////////////////////////////////////////////////////////////////
void FadeIn(string &in asTimer)
{
string x = asTimer;

if(x == "activate_player")
FadeIn(2);
AddTimer("Start", 2, "WakeUp");
}
/////////////////////////////////////////////////////////////////////////////////////////
void WakeUp(string &in asTimer)
{

string x = asTimer;

if (x == "Start")
{
SetLightVisible("Box_Light_1", true);
AddTime("MoveHead", 1, "WakeUp");
}
else if (x == "MoveHead")
{
MovePlayerHeadPos(-0.5, -0.2, -1.1, 2, 2);
FadePlayerRollTo(0, 1.7, 500);
AddTimer("ActivatePlayer", 2, "WakeUp");
}
else if (x == "ActivatePlayer")
{
MovePlayerHeadPos(0, 0, 0, 2, 2);
SetPlayerActive(true);
}
}

try that. if it still crashes, upload the error message again

and you put the bracket in the wrong spot, for one. i meant the line RIGHT BEFORE the timer else if x ++ activate player
It Crashed here is the error message:

FATAL ERROR: Could not load script file
'custom_stories/Amnesia_Fading Away/maps/01.hps'!
main (43, 1): ERR : No matching signatures to 'AddTime(string@&,
const uint, string@&)'
03-22-2014, 05:02 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#14
RE: I need help with my Custom Story!

ok, in void wakeup first bracket 'AddTime("MoveHead", 1 ,"WakeUp");'
addTime should be AddTimer

void Wakeup second bracket
AddTime should be AddTimer
type slower when coding

code pieces at a time and test a lot, helps with finding bugs
(This post was last modified: 03-22-2014, 05:06 AM by Vale.)
03-22-2014, 05:04 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#15
RE: I need help with my Custom Story!

(03-22-2014, 05:04 AM)valetheimpaler Wrote: ok, in void wakeup first bracket 'AddTime("MoveHead", 1 ,"WakeUp");'
addTime should be AddTimer

void Wakeup second bracket
AddTime should be AddTimer
type slower when coding

code pieces at a time and test a lot, helps with finding bugs
It worked! Thanks! Not exactly how i pictured it to look but ill have to deal with it! 1 more thing, how do you set the amount of oil to 0 OnStart?
03-22-2014, 05:08 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#16
RE: I need help with my Custom Story!

first off, Is it timer errors as far as intro? They may need clean up, I can help with those.
And do in Void onStart
SetPlayerLampOil(0.0f);
03-22-2014, 05:10 AM
Find
PutraenusAlivius Offline
Posting Freak

Posts: 4,713
Threads: 75
Joined: Dec 2012
Reputation: 119
#17
RE: I need help with my Custom Story!

void SetPlayerLampOil(float afOil);

EDIT: Ninja'd

"Veni, vidi, vici."
"I came, I saw, I conquered."
(This post was last modified: 03-22-2014, 05:10 AM by PutraenusAlivius.)
03-22-2014, 05:10 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#18
RE: I need help with my Custom Story!

(03-22-2014, 05:10 AM)valetheimpaler Wrote: first off, Is it timer errors as far as intro? They may need clean up, I can help with those.
And do in Void onStart
SetPlayerLampOil(0.0f);

It doesn't look like the character is laying down
03-22-2014, 05:13 AM
Find
Vale Offline
Member

Posts: 92
Threads: 13
Joined: Mar 2014
Reputation: 7
#19
RE: I need help with my Custom Story!

ok
uhm
as far as head height, play around with the y variable (the second one, ie 'x, y, z')
rotation idk just yet

hope that helps
(This post was last modified: 03-22-2014, 05:18 AM by Vale.)
03-22-2014, 05:15 AM
Find
mrburritos31 Offline
Junior Member

Posts: 18
Threads: 3
Joined: Jun 2013
Reputation: 0
#20
RE: I need help with my Custom Story!

(03-22-2014, 05:15 AM)valetheimpaler Wrote: ok
uhm
as far as head height, play around with the y variable (the second one, ie 'x, y, z')
rotation idk just yet

hope that helps

Thanks for all the Help! Smile
03-22-2014, 05:20 AM
Find




Users browsing this thread: 2 Guest(s)