Frictional Games Forum (read-only)
big Barrel ? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: big Barrel ? (/thread-25911.html)



big Barrel ? - Amnesiaplayer - 08-20-2014

How can i break a big barrel with an dagger ?!
i tried somethings but it didn't worked.
my script
PHP Code:
void OnStart()
{
AddUseItemCallback("""Cellar""Cellar""UsedKeyOnDoor"true);
AddEntityCollideCallback("Mes""Barrel""BarrelCreak"true1);
}


void MoveWall(string &in asEntityint alState
{
    if (
alState == -1)
    {
        
SetMoveObjectState("MoveWall"1);
        
SetLeverStuckState("secretlever", -1false);
        
PlaySoundAtEntity("""quest_completed.snt""MoveWall"0false);
    }

SetLevelDoorLocked("Cellar"false); 
PlaySoundAtEntity("""unlock_door.snt""Cellar"0false);
RemoveItem("Cellar");


void BarrelCreak(string&in asParentstring &in asChildint alState)
{
PlaySoundAtEntity("BarrelCreaking""explosion_rock_large.snt""Barrel"0.5ffalse);
SetPropHealth("Barrel"0);


i want that the barrel breaks. ( there is a lever inside the barrel )
so i can pull the lever and a wall is going to above...
and i got 1 question to about that thing... outside making custom background you need to... convert an image into a 6 Block things... i really forgot the name! i want to do some backgrounds Big Grin


RE: big Barrel ? - burge4150 - 08-20-2014

Does anything happen? Does the sound effect play? Do you get a "you cant use this item in this way" message?

Edit: Your callback doesn't support using an item on the barrel to break it. How do you want the player to break the barrel?


RE: big Barrel ? - Amnesiaplayer - 08-20-2014

yes i get that message and it doesn't matter how but if it works... i will be cool :S i don't know the script if you know can you show me ?!
but what i want is to break it with a dagger... Big Grin


RE: big Barrel ? - burge4150 - 08-20-2014

I'm not good enough to write script without an editor in front of me to double check syntax. I'll help ya with it when I get home tonight.

Real quick though, can someone verify that a barrel is indeed a breakable entity in the first place?


RE: big Barrel ? - Amnesiaplayer - 08-20-2014

there are barrel pieces but i saw on some custom stories exploding barrels...

i'm not gonna do the barrel but a prisoner.. or that person... that i knife goes into him... and a leve *sticks* out... how can i do this ??