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
Explosion Script Problem
phatdoggi Offline
Junior Member

Posts: 17
Threads: 4
Joined: Jun 2013
Reputation: 0
#1
Explosion Script Problem

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.

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);
}

"Just drink it. How bad could it be?"
Madness - http://www.moddb.com/mods/phatdoggi-madness
(This post was last modified: 07-07-2013, 02:31 AM by phatdoggi.)
07-07-2013, 12:31 AM
Find


Messages In This Thread
Explosion Script Problem - by phatdoggi - 07-07-2013, 12:31 AM
RE: Explosion Script Problem - by phatdoggi - 07-07-2013, 02:30 AM
RE: Explosion Script Problem - by Artyom - 07-07-2013, 02:45 AM



Users browsing this thread: 1 Guest(s)