The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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
Multiple Issues Help Entity + Texture Question and Script problem
rean2 Offline
Junior Member

Posts: 6
Threads: 1
Joined: Nov 2013
Reputation: 1
#1
Exclamation  Entity + Texture Question and Script problem

Hi!

Amnesia is an awesome game and as a fan of horror, it has inspired me to create some new custom stories. While working on 'Lights and Sounds' (working title), I have a few questions:

Some custom stories have custom entities, however they are not in the main game's entity folder, but in the custom story folder. I have placed my custom models in the main game because they show up in the editor. How do I place my entity models in the custom story folder and still place them in the level editor?

I also had a similar problem with textures. I think the textures disappeared if they weren't in the main game's textures folder.

I also have a problem with the script. I have a an object that can be created using the combine callback (which is in inventory.hps):

///////////////////////////////////
//SECOND FLOOR - COMBINE COPPER TUBE AND NEEDLE
void createBloodKey(string &in asItemA, string &in asItemB)
{
    PlayGuiSound("15_make_hammer", 0.7f);
    
    RemoveItem("hollow_needle"); RemoveItem("copper_tube");
    
    GiveItem("", "copper_tube_and_needle", "copper_tube_and_needle", "copper_tube_and_needle.tga", 1);
    
    SetMessage("Message", "createdbloodkey", 4);
}

//END SECOND FLOOR - COMBINE COPPER TUBE AND NEEDLE
///////////////////////////////////




////////////////////////////
// Run at the start of the game.
void OnGameStart()
{
    //SECOND FLOOR//
    AddCombineCallback("", "hollow_needle", "copper_tube", "createBloodKey", true);
}

but when i tried to use the created copper_tube_and_needle on a door to unlock

void OnStart()
{
    AddUseItemCallback("usebloodkeyondoor", "copper_tube_and_needle", "room207door", "bloodkeyondoor", true);
}

void bloodkeyondoor(string &in asItem, string &in asEntity)
{
    SetMessage("Message", "debug0", 4);
    SetSwingDoorLocked("room207door", false, true);
    PlaySoundAtEntity("", "unlock_door", "room207door", 0, false);
    RemoveItem("copper_tube_and_needle");
}

It doesn't work, I even set a debug message to show if that function was called but it doesnt show up!

Thanks for the help!
11-26-2013, 07:19 PM
Find


Messages In This Thread
Entity + Texture Question and Script problem - by rean2 - 11-26-2013, 07:19 PM



Users browsing this thread: 2 Guest(s)