Results 1 to 5 of 5

Thread: [E2] Bomb Truck

  1. #1
    Wire Amateur Spoon God's Avatar
    Join Date
    Jul 2009
    Posts
    91

    Default [E2] Bomb Truck

    Spawn this E2 on a jeep, and the jeep will turn into a truck.
    The truck has tinted windows, so nobody can see in, but if you sit inside it, you can see out perfectly well.
    The truck is filled with explosives, and is very volatile. It may explode if you crash into something at a high speed.
    The driver can prematurely detonate the truck by right clicking.
    This uses the same combat system as my Airboat Tank and Nuke Cannon, but it will cause mass damage to anything near the explosion. Be warned, it also takes damage from the combat system.




    Code:
    # Made by Spoon God
    @name Bomb Truck
    @persist [E I J K M R T Q Z]:number [V S]:entity [B Y H W]:array [C]:vector
    if(dsClk()){
        if(dsClk("DroneDamage")){
            if(dsGetEntity()==V){
                V:applyOffsetForce(vec(0,0,1)*V:mass()*150,V:pos()+V:right()*(random()>0.5 ? 10 : -10))
                TempCheck=1
                J-=randint(5,10)
            }
        }
        if(dsClk("TankDamage")){
            TempVec=dsGetVector()
            TempD=V:pos():distance(TempVec)
            if(TempD<300){
                V:applyOffsetForce(V:mass()*(V:pos()-TempVec)*(300-TempD)*0.01,TempVec)
                TempCheck=1
                J-=floor((300-TempD)/6)
            }
        }
        if(dsClk("NukeDamage")){
            TempVec=dsGetVector()
            TempD=V:pos():distance(TempVec)
            if(TempD<1000){
                V:applyOffsetForce(V:mass()*(V:pos()-TempVec)*(1000-TempD)*0.01,TempVec)
                TempCheck=1
                J-=ceil((1000-TempD)*0.2)
            }
        }
    }elseif(tickClk()){
        if(J>0){
            D=V:driver()
            if(D){
                if(D:keyAttack2()){
                    J=0
                    TempCheck=1
                }
            }
            TK=V:vel():length()
            if(!V:isPlayerHolding()){
                if(TK<K){
                    if(K-TK>300){
                        J-=5*sqrt(K-TK)
                        TempCheck=1
                        holoMaterial(20,"models/props_foliage/tree_deciduous_01a_trunk")
                    }
                }
            }else{
                for(X=1,Q){
                    TempP=entity(Q)
                    if(TempP){
                        if(TempP:weapon():type()=="weapon_crowbar"){
                            if(TempP:keyAttack1()){
                                if(TempP:aimEntity()==V){
                                    if(TempP:shootPos():distance(TempP:aimPos())<=75){
                                        J=clamp(J-1,0,100)
                                        TempCheck=1
                                    }
                                }
                            }
                        }
                    }
                }
            }
            K=TK
        }else{
            T++
            Temp=sin(T)
            TempC=cos(T)*255
            TempV=vec(14,14,14)+vec(Temp,Temp,Temp)*36
            TempA=ang(Temp*50,TempC*30,T*80)
            holoScale(1,TempV)
            holoScale(2,-TempV)
            holoAlpha(1,TempC)
            holoAlpha(2,TempC)
            holoAng(1,TempA)
            holoAng(2,-TempA)
            if(T>=90){
                selfDestructAll()
            }
        }
    }elseif(first()){
        Chip=entity()
        if(Chip:isWeldedTo():model()=="models/buggy.mdl"){
            V=Chip:isWeldedTo()
            if(V:isVehicle()){
                if(V:owner()==owner()){
                    TempCol=V:getColor()
                    if(TempCol:x()==255){
                        TempNumG=TempCol:y()
                        if(TempNumG==TempCol:z()){
                            J=TempNumG/2.55
                            V:setAlpha(0)
                        }else{
                            J=100
                            V:setColor(255,255,255,0)
                        }
                    }else{
                        J=100
                        V:setColor(255,255,255,0)
                    }
                    I=1
                    E=30
                    Chip:setAlpha(0)
                    C=vec(150,125,100)
                    P=V:pos()
                    A=V:angles()
                    A90=A+ang(90,0,0)
                    F="models/props_c17/FurnitureMetal001a"
                    holoCreate(1,P+vec(0,-70,10):rotate(A),vec(6,17,1),A,C,"cube")
                    holoParent(1,V)
                    holoMaterial(1,F)
                    holoCreate(2,P+vec(-21.6,40,10):rotate(A),vec(4,0.5,2),A+ang(0,20,0),C,"cube")
                    holoCreate(3,P+vec(21.6,40,10):rotate(A),vec(4,0.5,2),A-ang(0,20,0),C,"cube")
                    holoCreate(4,P+vec(0,14,28):rotate(A),vec(6,3,2),A,C,"cube")
                    holoCreate(5,P+vec(33,-88,28):rotate(A),vec(0.5,14,2),A,C,"cube")
                    holoCreate(6,P+vec(-33,-88,28):rotate(A),vec(0.5,14,2),A,C,"cube")
                    holoCreate(7,P+vec(42,0,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(8,P+vec(-42,0,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(9,P+vec(42,-152,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(10,P+vec(-42,-152,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(11,P+vec(42,-112,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(12,P+vec(-42,-112,15):rotate(A),vec(3,3,1),A90,vec(50,50,50),"hqcylinder2")
                    holoCreate(13,P+vec(33,-8,58):rotate(A),vec(0.5,0.5,4),A+ang(0,0,20),C,"cube")
                    holoCreate(14,P+vec(-33,-8,58):rotate(A),vec(0.5,0.5,4),A+ang(0,0,20),C,"cube")
                    holoCreate(24,P+vec(0,-8,58):rotate(A),vec(5,0.25,4),A+ang(0,0,20),vec(),"cube")
                    holoClip(24,vec(),ang(0,180,0):right(),0)
                    holoClipEnabled(24,1)
                    holoCreate(16,P+vec(0,-8,58):rotate(A),vec(5,0.25,4),A+ang(0,0,20),vec(),"cube")
                    holoClip(16,vec(),ang():right(),0)
                    holoClipEnabled(16,1)
                    holoAlpha(16,100)
                    holoCreate(17,P+vec(0,-37,80):rotate(A),vec(6,4,0.5),A,C,"cube")
                    holoCreate(18,P+vec(0,-64,47):rotate(A),vec(6,0.5,6),A,C,"cube")
                    holoCreate(25,P+vec(0,-30,47):rotate(A),vec(5.9,5.9,5.9),A,vec(50,50,50),"cube")
                    holoClip(25,vec(0,20,11),ang(0,0,20):right(),0)
                    holoClipEnabled(25,1)
                    holoCreate(20,P+vec(0,-30,47):rotate(A),vec(-5.1,-5.1,-5.1),A,vec(50,50,50),"cube")
                    holoAlpha(20,100)
                    holoClip(20,vec(0,20,11),ang(0,0,20):right(),0)
                    holoClipEnabled(20,1)
                    holoCreate(21,P+vec(0,-169,46):rotate(A),vec(6,0.5,5),A,C,"cube")
                    holoCreate(22,P+vec(33,-121,58):rotate(A),vec(0.5,7.5,3),A,C,"cube")
                    holoCreate(23,P+vec(-33,-121,58):rotate(A),vec(0.5,7.5,3),A,C,"cube")
                    holoCreate(15,P+vec(0,-79,46):rotate(A),vec(5,0.5,5),A,C,"cube")
                    holoCreate(19,P+vec(0,-124,40):rotate(A),vec(5,7,4),A,C,"cube")
                    for(X=2,25){
                        holoMaterial(X,F)
                        holoParent(X,1)
                    }
                    holoMaterial(24,"models/shiny")
                    holoMaterial(25,"models/shiny")
                    holoMaterial(19,"models/props_debris/concretefloor020a")
                    runOnTick(1)
                    runOnLast(1)
                    M=holoRemainingSpawns()
                    dsJoinGroup("SGCombatSystem")
                    dsSetScope(2)
                    Q=maxPlayers()
                    TempCheck=1
                }else{
                    printColor(vec(255,255,255)," -[ ",vec(255,0,0),"You must own that jeep",vec(255,255,255)," ]-")
                    selfDestruct()
                }
            }else{
                printColor(vec(255,255,255)," -[ ",vec(255,0,0),"Spawn the jeep from 'Vehicles' not 'Props'",vec(255,255,255)," ]-")
                selfDestruct()
            }
        }else{
            printColor(vec(255,255,255)," -[ ",vec(255,0,0),"Requires a jeep",vec(255,255,255)," ]-")
            selfDestruct()
        }
    }elseif(last()){
        holoDeleteAll()
        V:setAlpha(255)
    }
    if(TempCheck){
        TempCheck=0
        if(J>0){
            TempC=sin(J*0.9)
            for(X=1,23){
                if(X<7|X>12){
                    holoColor(X,C*TempC)
                }
            }
            TempC=J*2.55
            V:setColor(255,TempC,TempC)
        }else{
            holoDeleteAll()
            V:killPod()
            V:lockPod(1)
            V:soundPlay("Splosion"+I,0,"^weapons/explode2.wav")
            dsLeaveGroup("SGCombatSystem")
            dsSend("NukeDamage","SGCombatSystem",2,V:pos())
            T=0
            for(X=1,2){
                holoCreate(X,V:pos(),vec(),ang(),vec(255,255,255),"hqicosphere2")
                holoMaterial(X,"models/effects/splode_sheet")
            }
        }
    }
    Idea from the Bomb Truck on Command and Conquer: Generals.
    Last edited by Spoon God; 06-22-2010 at 03:02 PM. Reason: FIX >_<
    (Ragdoll Keyframer) (Awesome Heads) (Fish Tank) (Virtual Fish Pond) (Fishing Rod) (Crap) (Sparkle) (Airboat Tank V2.0) (Balls of Rubber V2.0) (Bomb Truck) (Nuke Cannon) (Jet)
    If my computer is online, you can see all my new stuff at my E2 page.

  2. #2
    Wirererer Manslaughter's Avatar
    Join Date
    Sep 2009
    Location
    Eureka, NT: owner():pos()
    Posts
    150

    Default Re: [E2] Bomb Truck

    Once again! AWSOME!
    i really do hope u make all the C&C's...
    Oh and did you know... They released classics for FREE :3
    Use Dropbox!
    It's Easy, Free, File Sharing

    I'm tired of these ad ridden junk sites, this is free, no ad's, 8!GB Space.
    Build, Fight, Survive
    My FTS Server: 98.237.13.239:27015
    Quote Originally Posted by Albert Einstein
    Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe.

  3. #3
    Wire Amateur Spoon God's Avatar
    Join Date
    Jul 2009
    Posts
    91

    Default Re: [E2] Bomb Truck

    Quote Originally Posted by Manslaughter View Post
    Oh and did you know... They released classics for FREE :3
    I thought they were free ages ago, or did you mean legally? Lol.
    (Ragdoll Keyframer) (Awesome Heads) (Fish Tank) (Virtual Fish Pond) (Fishing Rod) (Crap) (Sparkle) (Airboat Tank V2.0) (Balls of Rubber V2.0) (Bomb Truck) (Nuke Cannon) (Jet)
    If my computer is online, you can see all my new stuff at my E2 page.

  4. #4
    Wire Amateur Spoon God's Avatar
    Join Date
    Jul 2009
    Posts
    91

    Default Re: [E2] Bomb Truck

    Fixed: I forgot to make it cause damage when it explodes. Doh!
    (Ragdoll Keyframer) (Awesome Heads) (Fish Tank) (Virtual Fish Pond) (Fishing Rod) (Crap) (Sparkle) (Airboat Tank V2.0) (Balls of Rubber V2.0) (Bomb Truck) (Nuke Cannon) (Jet)
    If my computer is online, you can see all my new stuff at my E2 page.

  5. #5
    Wire Noob reececlarke's Avatar
    Join Date
    Jul 2010
    Posts
    1

    Default Re: [E2] Bomb Truck

    i think you idears for stuff like this is amazing and how close it looks to the one in the game is good to u might wanna make a airboat boat lolz also i would like to same air craft to this amazing set well done i got all the code to the nuke this and the other one and some other suff of yours

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
unnecessary
unnecessary
unnecessary
unnecessary
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots