Frictional Games Forum (read-only)

Full Version: [SOLVED!] Custom story wont show up
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I'm working on a custom story, I've finished the map, I've already scripted so theres a key to a door. But when I wanna test run the custom story doesn't show up in the list.
Heres my extra_english.lang




You wake up inside a jail cell, you can't remember how you got inside. You don't even remember your name. As you explore the Castle of the Evil, things start to slowly get back to you.


"This must open the cell door."
Cell Key



Heres custom_story settings.cfg

ImgFile = "story.png"
Name = "The Castle of the Evil"
Author = "HeavenSh0ck"

MapsFolder = "maps/"
StartMap = "The Castle of the Evil"
StartPos = "PlayerStartArea1"
/>
My map .hps file

////////////////////////////
// Run when entering map
void OnEnter()
{
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("celldoor", false, true);
PlaySoundAtEntity("", "unlock_door", "celldoor", "0", false);
RemoveItem(celldoorkey);
}

////////////////////////////
// Run when leaving map
void OnLeave()
{

}
StartMap = "The Castle of the Evil.map"
MapsFolder = "maps/"
StartMap = "The Castle of the Evil.map"

ImgFile = "story.png"

I thought it only worked with jpg, but I haven't really tested it with png.

Also I want to fix the Key script
{
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);
}

void MyFunc(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked("celldoor", false, true);
PlaySoundAtEntity("", "unlock_door", "celldoor", "0", false);
RemoveItem(celldoorkey);
GiveSanityBoostSmall(); //This is an optional script function
}


Those two bolded have to correspond with each other.
(05-06-2012, 11:47 AM)Xanthos Wrote: [ -> ]MapsFolder = "maps/"
StartMap = "The Castle of the Evil.map"

ImgFile = "story.png"

I thought it only worked with jpg, but I haven't really tested it with png.
The MapsFolder works just fine with "maps/", and while I think that "story.png" works fine, the engine will just skip showing a picture if it cannot find one, so that's not a problem.
(05-06-2012, 11:53 AM)Cranky Old Man Wrote: [ -> ]
(05-06-2012, 11:47 AM)Xanthos Wrote: [ -> ]MapsFolder = "maps/"
StartMap = "The Castle of the Evil.map"

ImgFile = "story.png"

I thought it only worked with jpg, but I haven't really tested it with png.
The MapsFolder works just fine with "maps/", and while I think that "story.png" works fine, the engine will just skip showing a picture if it cannot find one, so that's not a problem.
Thanks,

How do you know all of this if you don't make custom stories? XD
Thanks, it worked I see it on my list - but when I run the custom story, this is the new error I get:FATAL ERROR: Could not load script file 'custom_stories/The Castle of the Evil/custom_stories/The Castle of the Evil/maps/The Castle of the Evil.hps'!
main (5,1):ERR : No matching signatures to
'AddUseItemCallBack(string@&, string@&, string@&, string@&, const
bool)'
(05-06-2012, 12:06 PM)HeavenSh0ck Wrote: [ -> ]Thanks, it worked I see it on my list - but when I run the custom story, this is the new error I get:FATAL ERROR: Could not load script file 'custom_stories/The Castle of the Evil/custom_stories/The Castle of the Evil/maps/The Castle of the Evil.hps'!
main (5,1):ERR : No matching signatures to
'AddUseItemCallBack(string@&, string@&, string@&, string@&, const
bool)'
Move
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);


From "OnEnter" To "Onstart"
Onstart()
{
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);

}
////////////////////////////
// Run when entering map
void OnEnter()
{
}

void OnStart()
{
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);
}

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

////////////////////////////
// Run when leaving map
void OnLeave()
{

}

Heres the script I am still having the same error.
AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);


That CallBack B needs to be lower case.
(05-06-2012, 12:15 PM)Xanthos Wrote: [ -> ]AddUseItemCallBack("", "celldoorkey", "celldoor", "UsedKeyOnDoor", true);


That CallBack B needs to be lower case.
That does it, just one thing - the custom story description won't show... Do you have a fix for this?
Pages: 1 2