KF pipe bomb exploding when the sentry bot walking over

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

ZombiKon

FNG / Fresh Meat
Oct 1, 2013
85
2
0
Hi :)

I use ScrN Balance, and i edit my Anti Tank Mine, to not explode when bots cross over, maybe its help for you.

You must edit the PipeBombProjectiles.uc:

Code:
function Timer()
{
    local Pawn CheckPawn;
    local float ThreatLevel;
    local vector DetectLocation;
    local bool bSameTeam; //pawn is from the same team as instigator
    
    DetectLocation = Location;
    DetectLocation.Z += 25; // raise a detection poin half a meter up to prevent small objects on the ground bloking the trace

    if( !bHidden && !bTriggered )
    {
        if( ArmingCountDown >= 0 )
        {
            ArmingCountDown -= 0.1;
            if( ArmingCountDown <= 0 )
            {
                SetTimer(1.0,True);
            }
        }
        else
        {
            // Check for enemies
            if( !bEnemyDetected )
            {
                bAlwaysRelevant=false;
                PlaySound(BeepSound,,0.5,,50.0);

                foreach VisibleCollidingActors( class 'Pawn', CheckPawn, DetectionRadius, DetectLocation )
                {
                    // don't trigger pipes on NPC  -- PooSH
                    bSameTeam = KF_StoryNPC(CheckPawn) != none 
                        || (CheckPawn.PlayerReplicationInfo != none && CheckPawn.PlayerReplicationInfo.Team.TeamIndex == PlacedTeam);
                    if( CheckPawn == Instigator 
                        || (bSameTeam && KFGameType(Level.Game).FriendlyFireScale > 0) )
                    {
                        // Make the thing beep if someone on our team is within the detection radius
                        // This gives them a chance to get out of the way
                        ThreatLevel += 0.001;
                    }
                    else
                    {
                        if( CheckPawn.Health > 0 //don't trigger pipes by dead bodies  -- PooSH
                            && CheckPawn != Instigator && CheckPawn.Role == ROLE_Authority
                            && !bSameTeam )
                        {
                            if( KFMonster(CheckPawn) != none )
                            {
                                ThreatLevel += KFMonster(CheckPawn).MotionDetectorThreat;
                                if( ThreatLevel >= ThreatThreshhold )
                                {
                                    bEnemyDetected=true;
                                    SetTimer(0.15,True);
                                }
                            }
                            else
                            {
                                bEnemyDetected=true;
                                SetTimer(0.15,True);
                            }
                        }
                    }

                }

                if( ThreatLevel >= ThreatThreshhold )
                {
                    bEnemyDetected=true;
                    SetTimer(0.15,True);
                }
                else if( ThreatLevel > 0 )
                {
                    SetTimer(0.5,True);
                }
                else
                {
                    SetTimer(1.0,True);
                }
            }
            // Play some fast beeps and blow up
            else
            {
                bAlwaysRelevant=true;
                Countdown--;

                if( CountDown > 0 )
                {
                    PlaySound(BeepSound,SLOT_Misc,2.0,,150.0);
                }
                else
                {
                    Explode(DetectLocation, vector(Rotation));
                }
            }
        }
    }
    else
    {
        Destroy();
    }
}
 

***Stuxnet***

FNG / Fresh Meat
Ho thank you !! Works fine just a little problem with my new pipe! Works very well just turn on and once lay on the floor we see the red light flashing as before it was under the ground if someone has an idea? I recreated a package to avoid the missmatch but I 'have this little problem

ps:sry for my bad english!


PipeBombV1:
https://www.dropbox.com/s/pyk76hyhbnxoonc/PipeBombV1.rar?dl=0
 

Attachments

  • Bug pipe.jpg
    Bug pipe.jpg
    57.3 KB · Views: 0
Last edited:

Slie

FNG / Fresh Meat
Dec 16, 2010
270
5
0
I remember running into that issue a long time ago and I believe it was from not specifying a staticmesh in the default properties.