Frictional Games Forum (read-only)

Full Version: Explosion Script Problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have searched and experimented high and low, but this script got the better of me. I have an epoxy container (entity:"ready") and I want to throw a rock at it to make a nice explosion to clear some debris. The only problem is the collision callback. I have 3 rocks to use, and I added a collision callback to the container for each of them, but the game still won't run the callback. All that happens is the container fizzles silently and disappears. Any help is appreciated.

Code:
void interactDoor(string &in asEntity)
{
    SetPropHealth("scareDoor", 10.0f);
    CreateParticleSystemAtEntity("ps1", "ps_break_wood.ps", "areaDoorDust", true);
    GiveSanityDamage(15.0f, true);
    PlaySoundAtEntity("", "react_breath.snt", "Player", 0, false);
    PlayMusic("amb_extra02.ogg", true, 0.3f, 1, 1, true);
    
    AddEntityCollideCallback("ready", "rock1", "collideBoom", true, 1);
    AddEntityCollideCallback("ready", "rock2", "collideBoom", true, 1);
    AddEntityCollideCallback("ready", "rock3", "collideBoom", true, 1);
}

void collideBoom(string &in asParent, string &in asChild, int alState)
{
    AddTimer("sound", 1, "timerBoom");
    AddTimer("1", 4, "timerBoom");
}

void timerBoom(string &in asTimer)
{
    if(asTimer == "sound"){
        PlaySoundAtEntity("", "12_epoxy_blow", "caveIn", 0, false);
        StartScreenShake(0.01, 0, 0, 2.9f);
        return;
    }
    
    SetPropHealth("caveIn", 0);
    
    StartScreenShake(0.08, 2.5f, 0, 1.0f);
    
    FadeImageTrailTo(0.5, 1);
}
FIXED.

Used a OnIgnite Callback called in the MAP, not the SCRIPT.
*facepalm*

For those of you with the same problem, put your callback name in the "Callback" under the entity tab on your object you want interacted (or in this case ignited).

Thanks for the moral support, people. Tongue
(07-07-2013, 02:30 AM)phatdoggi Wrote: [ -> ]FIXED.

Used a OnIgnite Callback called in the MAP, not the SCRIPT.
*facepalm*

For those of you with the same problem, put your callback name in the "Callback" under the entity tab on your object you want interacted (or in this case ignited).

Thanks for the moral support, people. Tongue

Good job sorting it out Wink