Frictional Games Forum (read-only)

Full Version: big Barrel ?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
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?
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
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?
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 ??