Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: [E2] AirBoatTank

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

    Default [E2] AirBoatTank

    V2 RELEASED!

    _Changelog_
    V2.0 - Implemented hp and damage system, now you can battle with them.
    The tank will become darker and darker as it takes damage, and will explode (killing the driver) when its health is depleted.
    Improved the holoCreation, it should look fine when spawned on an angle now.
    The projectiles no longer fire in a straight line.
    Added trails to the projectiles.
    Improved the Projectile Explosions.

    Don't worry, this isn't some numpad turret on the front of an airboat with hoverballs and walls of max power thrusters all with sound on.
    It's an E2 for use with the airboat, and it literally is a tank.
    This does not require anything except the latest version of wiremod.

    If you want to battle them you should also try my Bomb Truck and my Nuke Cannon, as they use the same combat system.

    _You will need_
    - One Airboat


    _Instructions_
    - Spawn the E2 on your airboat


    _How to use_
    - Enter the airboat, with E


    _Controls_
    - WASD to move around
    - Move the mouse to aim
    - Click to shoot


    Since the airboat has both first and thirdperson views, so does this:


    Simple as that? Wow!

    Code:
    # Made by Spoon God
    @name Airboat Tank! 2.0
    @persist [E I J M Max R T Q Z]:number [V S]:entity [B Y H Hit W]:array [C Gravity]: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){
            T--
            R--
            if(T>0){
                holoAlpha(12,T*5.1)
                holoScale(12,vec(1.2,1.2,10-(T/5)))
            }else{
                holoAlpha(12,0)
                holoScale(12,vec(1.2,1.2,0))
            }
            D=V:driver()
            if(D){
                TempAng=ang(0,D:eyeAngles():yaw()+90,clamp(D:eyeAngles():pitch()+90,50,96))
                holoAng(10,TempAng)
                if(Z){
                    if(!D:keyAttack1()){
                        Z=0
                    }
                }elseif(D:keyAttack1()){
                    Z=1
                    if(R<=0){
                        T=50
                        R=150
                        G=S:pos()
                        TempHolo=holoCreate(-I,G,vec(1,1,1),ang(),vec(10,10,10),"hqicosphere2")
                        Y[I,vector]=TempAng:up()*E
                        H[I,number]=100
                        Hit[I,number]=1
                        W[I,number]=0
                        TempHolo:setTrails(10,0,1,"trails/smoke",vec(),255)
                        B[I,entity]=TempHolo
                        holoMaterial(-I,"models/shiny")
                        if(Max<M){
                            Max++
                        }
                        S:soundPlay("Shooting"+I,0,"^weapons/explode4.wav")
                        I++
                        if(I>M){
                            I=1
                        }
                    }
                }
            }else{
                holoAng(10,V:angles()-ang(0,0,90))
                T=0
                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+0.1,0,100)
                                        TempCheck=1
                                    }
                                }
                            }
                        }
                    }
                }
            }
            for(X=1,Max){
                TempNum=W[X,number]
                if(TempNum){
                    if(TempNum>100){
                        holoClipEnabled(-X,0)
                        holoDelete(-X)
                        B[X,entity]:setTrails(10,0,1,"trails/smoke",vec(),0)
                        W[X,number]=0
                    }else{
                        TempNum=TempNum+1
                        TempNum2=sin(TempNum*0.9)*50
                        TempNum3=cos(TempNum*0.9)
                        holoScale(-X,vec(TempNum2,TempNum2,TempNum2))
                        holoAlpha(-X,TempNum3*255)
                        holoAng(-X,ang(TempNum*6,TempNum2*10,TempNum*2))
                        W[X,number]=TempNum
                    }
                }elseif(Hit[X,number]){
                    TempPos=B[X,entity]:pos()
                    TempVec=(Y[X,vector]-Gravity)*0.999
                    TempR=rangerOffset(TempPos,TempPos+TempVec)
                    if(TempR:hit()&TempR:entity()!=V){
                        Hit[X,number]=0
                        holoClip(-X,TempR:position(),TempR:hitNormal(),1)
                        holoClipEnabled(-X,1)
                        holoMaterial(-X,"models/effects/splode_sheet")
                        holoColor(-X,vec(255,255,255))
                        TempHoloEnt=B[X,entity]
                        dsSend("TankDamage","SGCombatSystem",2,TempR:position())
                        TempHoloEnt:soundPlay("Splosion"+I,0,"^weapons/explode2.wav")
                        soundVolume("Splosion"+I,10)
                        W[X,number]=1
                    }else{
                        holoPos(-X,TempPos+TempVec)
                        Y[X,vector]=TempVec
                    }
                }
            }
        }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/airboat.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=60
                    Gravity=vec(0,0,0.75)
                    Chip:setAlpha(0)
                    V:setAlpha(0)
                    runOnTick(1)
                    runOnLast(1)
                    C=vec(25,150,25)
                    A=V:angles()
                    A2=ang(A:roll(),A:yaw(),-A:pitch())
                    P=V:pos()
                    F=ang(45,90,0):forward()
                    holoCreate(1,P+vec(0,0,18):rotate(A),vec(5,10,2.5),A,C,"cube")
                    holoCreate(2,P+vec(42,0,15):rotate(A),vec(2,11,3),A,C,"cube")
                    holoCreate(3,P+vec(-42,0,15):rotate(A),vec(2,11,3),A,C,"cube")
                    holoCreate(4,P+vec(42,66,15):rotate(A),vec(2,2.14,2.14),A+ang(0,0,45),C,"cube")
                    holoClip(4,vec(),F,0)
                    holoClipEnabled(4,1)
                    holoCreate(5,P+vec(-42,66,15):rotate(A),vec(2,2.14,2.14),A+ang(0,0,45),C,"cube")
                    holoClip(5,vec(),F,0)
                    holoCreate(6,P+vec(42,-66,15):rotate(A),vec(2,2.14,2.14),A+ang(0,0,45),C,"cube")
                    holoClip(6,vec(),-F,0)
                    holoClipEnabled(6,1)
                    holoCreate(7,P+vec(-42,-66,15):rotate(A),vec(2,2.14,2.14),A+ang(0,0,45),C,"cube")
                    holoClip(7,vec(),-F,0)
                    holoClipEnabled(7,1)
                    holoCreate(8,P+vec(0,0,45):rotate(A),vec(6,6,3.5),A,C,"hqcylinder2")
                    holoClip(8,vec(0,0,15),vec(0,0,-1),0)
                    holoClipEnabled(8,1)
                    holoCreate(9,P+vec(0,0,58):rotate(A),vec(6,6,3),A,C,"hqicosphere2")
                    holoCreate(10,P+vec(0,0,48):rotate(A),vec(1,1,20),A+ang(0,0,90),C,"hqcylinder2")
                    holoClip(10,vec(),vec(0,0,1),0)
                    holoClipEnabled(10,1)
                    for(X=1,10){
                        holoParent(X,V)
                        holoMaterial(X,"models/props_c17/FurnitureMetal001a")
                    }
                    S=holoCreate(11,P+vec(0,-126,48):rotate(A),vec(1.3,1.3,1),A+ang(0,0,90),C,"hqcylinder2")
                    holoMaterial(11,"models/props_c17/FurnitureMetal001a")
                    holoCreate(12,P+vec(0,-132,48):rotate(A),vec(1.2,1.2,10),A+ang(0,0,90),vec(255,255,255),"hqicosphere2")
                    holoMaterial(12,"models/props_foliage/tree_deciduous_01a_trunk")
                    holoClip(12,vec(),A:up(),0)
                    holoClipEnabled(12,1)
                    holoAlpha(12,0)
                    for(X=11,12){
                        holoParent(X,10)
                    }
                    M=max(holoRemainingSpawns(),5)
                    dsJoinGroup("SGCombatSystem")
                    dsSetScope(2)
                    Q=maxPlayers()
                    TempCheck=1
                }else{
                    printColor(vec(255,255,255)," -[ ",vec(255,0,0),"You must own the airboat",vec(255,255,255)," ]-")
                    selfDestruct()
                }
            }else{
                printColor(vec(255,255,255)," -[ ",vec(255,0,0),"Spawn the airboat from 'Vehicles' not 'Props'",vec(255,255,255)," ]-")
                selfDestruct()
            }
        }else{
            printColor(vec(255,255,255)," -[ ",vec(255,0,0),"Requires an Airboat",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,11){
                holoColor(X,C*TempC)
            }
            TempC=J*2.55
            V:setColor(255,TempC,TempC)
        }else{
            V:setColor(255,0,0,0)
            holoDeleteAll()
            V:killPod()
            V:lockPod(1)
            V:soundPlay("Splosion"+I,0,"^weapons/explode2.wav")
            dsLeaveGroup("SGCombatSystem")
            T=0
            for(X=1,2){
                holoCreate(X,V:pos(),vec(),ang(),vec(255,255,255),"hqicosphere2")
                holoMaterial(X,"models/effects/splode_sheet")
            }
        }
    }
    Last edited by Spoon God; 06-18-2010 at 12:00 PM. Reason: Updated to V2.0
    (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
    Wire Noob Cubehamster's Avatar
    Join Date
    May 2010
    Posts
    12

    Default Re: [E2] AirBoatTank

    Just like the A-team!!!

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

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by Cubehamster View Post
    Just like the A-team!!!
    I suppose, but I actually got the idea from
    (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 Sofaking ShadowBrain's Avatar
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    1,165

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by Spoon God View Post
    I suppose, but I actually got the idea from
    :O I used to play that untill my account mysteriously got deleted...
    I maek 3D mdoels adn paly veido gaems!

    Hey! I make Android games now! https://play.google.com/store/apps/d...id=ShadowBrain
    Check out the company I made some 3D models for!

  5. #5
    Wirererer Blob 92's Avatar
    Join Date
    Dec 2009
    Location
    vec( √ -1, √ -1, √ -1 )
    Posts
    222

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by ShadowBrain View Post
    :O I used to play that untill my account mysteriously got deleted...
    What game is that? It has the graphical qualities of "Worms 4 Mayhem"

  6. #6
    Wirererer RayzaBlack's Avatar
    Join Date
    Oct 2008
    Location
    The land Down-under!
    Posts
    128

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by Blob 92 View Post
    What game is that? It has the graphical qualities of "Worms 4 Mayhem"
    Battlefield Heroes.
    Is good.

  7. #7
    Wiremod Helper Donkie's Avatar
    Join Date
    May 2008
    Location
    Sweden
    Posts
    1,746

    Default Re: [E2] AirBoatTank

    Its good, but i rather pay for a game then having to pay for clothes and stuff, everyone else get so OP.
    Get out. Seriously, do it.

  8. #8
    Wire Sofaking ShadowBrain's Avatar
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    1,165

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by Blob 92 View Post
    What game is that? It has the graphical qualities of "Worms 4 Mayhem"
    The picture actually links to the game's site, click it if you're interested.
    I maek 3D mdoels adn paly veido gaems!

    Hey! I make Android games now! https://play.google.com/store/apps/d...id=ShadowBrain
    Check out the company I made some 3D models for!

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

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by ShadowBrain View Post
    The picture actually links to the game's site, click it if you're interested.
    So you noticed!

    I got in on the closed beta of BF:H, but also lost mah acc...
    (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.

  10. #10
    Wire Sofaking ShadowBrain's Avatar
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    1,165

    Default Re: [E2] AirBoatTank

    Quote Originally Posted by Spoon God View Post
    So you noticed!

    I got in on the closed beta of BF:H, but also lost mah acc...
    Exact same thing happened to me, I'm guessing they wanted everyone to start equally on the same level, but people who bought shit back in the early beta were pissed I bet.
    I maek 3D mdoels adn paly veido gaems!

    Hey! I make Android games now! https://play.google.com/store/apps/d...id=ShadowBrain
    Check out the company I made some 3D models for!

Page 1 of 2 12 LastLast

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