+ Reply to Thread
Results 1 to 8 of 8

Thread: xThaWolfx Holographic RocketLauncher

  1. #1
    Wire Amateur xThaWolfx's Avatar
    Join Date
    Sep 2009
    Location
    The Netherlands
    Posts
    41

    Talking xThaWolfx Holographic RocketLauncher

    I made this on my own, I did not use the javelin made by Unsmart.
    Its an easy to use rocketlauncher, mouse aimed and capable of locking onto props.
    Don't re-upload this to any site.
    Enjoy! =D

    Known Bugs: Sometimes when you shoot the rocket starts at a different position than the launcher.
    This is completely random and I have no idea how to fix this.


    Code:
    @name xThaWolfx HoloRocketLauncher
    @persist H1:entity Blast Shoot Dist Boom Mouse2 Hull 
    @persist Q:vector Bum Nose Flame T Ready Use AutoAim Ee:entity
    @persist Idle
    @trigger 
    runOnTick(1)
    runOnChat(1)
    
    O=owner()
    Mouse2=O:keyAttack2()
    Use=O:keyUse()
    Said=O:lastSaid():explode(" ")
    C1=Said:string(1)
    C2=Said:string(2)
    
    if(chatClk(O)){
        if(C1=="!idle"){
            Idle=1
        }
        elseif(C1=="!ready"){
            Idle=0
        }
    }
    
    if(first()){
        Hull=100
        Bum=200
        Nose=300
        Flame=400
        
    
        print("Shooting and Reloading with Mouse2.")
        print("Lock on Props with Use.")
        print("To have the Launcher on your back, type !idle.")
        print("To make the Launcher ready for use, type !ready.")
        print("Made by xThaWolfx, Do not re-upload to any site.")
        Blast=500
        Idle=0
        holoCreate(1)
        holoCreate(2)
        holoCreate(3)
        holoCreate(4)
        holoCreate(5)
        holoCreate(6)
        holoCreate(7)
        holoCreate(8)
        holoCreate(9)
        holoCreate(10)
        holoCreate(Nose)
        holoCreate(Hull)
        holoCreate(Flame)
        H1=holoEntity(1)
        
        holoParent(1, O)
        holoModel(1, "hqcylinder2")
        holoScale(1, vec(1,1,5))
        holoMaterial(1, "models/XQM/CellShadedCamo_diffuse")
        holoColor(1, vec(0,125,0))
        
        holoParent(2,H1)
        holoModel(2,"hqcylinder2")
        holoPos(2, H1:toWorld(vec(10,0,15)))
        holoAng(2, H1:angles()+ang(90,0,0))
        holoScale(2, vec(0.3,0.3,1))
        holoMaterial(2, "models/XQM/CellShadedCamo_diffuse")
        holoColor(2, vec(0,125,0))
        
        holoParent(3, H1)
        holoPos(3, H1:toWorld(vec(0,0,30)))
        holoModel(3, "hqtorus")
        holoScale(3, vec(1,1,2))
        holoMaterial(3, "models/XQM/CellShadedCamo_diffuse")
        holoColor(3, vec(0,125,0))
        
        holoParent(4,H1)
        holoModel(4,"hqcylinder2")
        holoPos(4, H1:toWorld(vec(0,0,30)))
        holoColor(4, vec(0,0,0))
        holoScale(4, vec(0.9,0.9,0.1))
        
        holoParent(5,H1)
        holoModel(5,"hqicosphere2")
        holoPos(5, H1:toWorld(vec(10,0,15)))
        holoAng(5, H1:angles()+ang(90,0,0))
        holoScale(5, vec(0.4,0.4,0.5))
        holoMaterial(5, "models/XQM/2Deg360_diffuse")
        holoColor(5, vec(0,125,0))
        
        holoParent(6,H1)
        holoModel(6,"dome")
        holoPos(6, H1:toWorld(vec(16,0,15)))
        holoScale(6,vec(0.3,0.3,0.2))
        holoAng(6,H1:toWorld(ang(90,0,0)))
        holoMaterial(6, "models/XQM/CellShadedCamo_diffuse")
        holoColor(6, vec(0,125,0))
        
        holoParent(7,H1)
        holoModel(7,"hqsphere2")
        holoPos(7,H1:toWorld(vec(0,6,25)))
        holoScale(7,vec(0.2,0.2,0.2))
        holoColor(7,vec(0,255,0))
        
        holoParent(8,H1)
        holoModel(8,"hqsphere2")
        holoPos(8,H1:toWorld(vec(0,6,15)))
        holoScale(8,vec(0.2,0.2,0.2))
        holoColor(8,vec(255,0,0))
        
        
        holoParent(9,H1)
        holoPos(9, H1:toWorld(vec(0,0,-29.5)))
        holoModel(9,"hqtorus")
        holoMaterial(9, "models/XQM/CellShadedCamo_diffuse")
        holoColor(9, vec(0,125,0))
        
        holoParent(10,H1)
        holoPos(10, H1:toWorld(vec(0,0,-29.5)))
        holoModel(10, "hqcylinder")
        holoScale(10, vec(0.9,0.9,0.1))
        holoColor(10, vec(0,0,0))
        
        
    
    
        
    
    
    }
    if(first())
    {
        holoPos(Hull,H1:pos())
    
        holoCreate(0,vec(0,0,0),vec(0.01,0.5,0.5))
        holoMaterial(0,"models/roller/rollermine_glow")
        holoCreate(1200,vec(0,0,0))
        holoAlpha(1200,0)
        
    }
    Rd=O:eyeTrace()
    T=(T+5)%360
    if(Rd:position())
    {
        holoPos(0,Rd:position()+Rd:hitNormal()*0.2)
        holoAng(0,Rd:hitNormal():toAngle())  
        holoColor(0,hsv2rgb(vec(1,1,1)))  
        holoShadow(1200,0)
        holoShadow(0,0)
    }
        holoPos(1200,Rd:position()+Rd:hitNormal()*1)
    
    
    
    
    
    
        
    
    
    
    Ang = angnorm((Q - holoEntity(Hull):pos()):toAngle()+ang(90,0,0))
    Forward=holoEntity(Hull):up()
    
    if(!Idle){
        if($Mouse2 & Mouse2 & O:aimEntity()!=entity() & !O:keyAttack1()){
        
    if(!Shoot){
        Shoot=1   
        holoCreate(Hull)
        holoCreate(Flame)
        holoCreate(Nose)
        holoPos(Hull,H1:toWorld(vec(0,0,5)))
        holoEntity(Flame):setTrails(5,0,1,"trails/smoke",vec(255,255,255),255)
        holoEntity(Hull):soundPlay(7331,0,"weapons/rpg/rocket1.wav")
        H1:soundPlay(7332,1,"weapons/rpg/rocketfire1.wav")
        holoColor(7,vec(255,0,0))
    }
    elseif(Shoot){
        holoEntity(Flame):removeTrails()
        Shoot=0
        holoEntity(1):soundPlay(7332,1,"weapons/rpg/shotdown.wav")
        holoEntity(Hull):soundPlay(7331,0,"")
        holoColor(7,vec(0,255,0))
    }
    }
    if($Use & Use){
        if(!AutoAim){
            AutoAim=1
            Ee=O:aimEntity()
            holoEntity(8):soundPlay(1,0,"buttons/blip1.wav")
        }
        elseif(AutoAim){
        AutoAim=0
        holoEntity(8):soundPlay(1,0,"HL1/fvox/beep.wav")
    }
    }
    if(!AutoAim){
        Q=O:aimPos()
        holoColor(8,vec(255,0,0))
    }
    if(AutoAim){
        holoColor(8,vec(0,255,0))
        Q=Ee:massCenter()
    }
    
        
        
        holoAng(1, angnorm(O:eye():toAngle()+ang(90,0,0)):setRoll(0):setYaw(O:angles():yaw()))
        holoPos(1, O:toWorld(vec(10,-15,60-(O:isCrouch()*30))))
    
    
    if(!Shoot){
        holoPos(Hull,H1:pos())
        holoAlpha(Hull,0)
        holoAlpha(Nose,0)
        holoAlpha(Flame,0)}
    elseif(Shoot & !Boom){
        holoAng(Hull,Ang)
        holoPos(Hull,holoEntity(Hull):pos()+Forward*50)
        holoAlpha(Hull,255)
        holoAlpha(Nose,255)
        holoAlpha(Flame,255)
    }
    ####################################################################################
    if(Shoot){Dist=holoEntity(Nose):pos():distance(Q)}
    elseif(!Shoot){Dist=10000}
    
    if((Shoot & Dist<=100) | (Shoot & !holoEntity(Nose))){
        Boom=1
    }
    elseif(Shoot & Dist>100){
        Boom=0
    }
    
    holoModel(Hull,"hqcylinder2")
    holoScale(Hull,vec(0.5,0.5,2))
    holoAng(Hull,Ang)
    
    
    
    
    
    
    if($Boom & Boom){
        Blast+=1
        holoAlpha(Hull,0)
        holoAlpha(Nose,0)
        holoAlpha(Flame,0)
       
        holoCreate(Bum,holoEntity(Nose):pos())
        holoModel(Bum,"hqsphere2")
        holoEntity(Bum):soundPlay(7331,1,"ambient/explosions/explode_2.wav")
        holoEntity(Bum):soundPlay(7332,0,"")
        holoColor(Bum,vec(150,0,0))
        holoMaterial(Bum,"models/effects/splode_sheet")
        holoEntity(Flame):removeTrails()
        holoDelete(Hull)
        holoDelete(Nose)
        holoDelete(Flame)
        holoCreate(Blast,holoEntity(Bum):pos())
        holoAng(Blast,O:eyeTrace():hitNormal():toAngle()+ang(90,0,0))
        holoModel(Blast,"hqcylinder2")
        if(O:aimEntity()){
        holoScale(Blast,vec(O:aimEntity():boxSize():x()/12,O:aimEntity():boxSize():x()/12,0.1))
        }
        else{holoScale(Blast,vec(25,25,0.1))}
        holoParent(Blast,Ee)
        holoMaterial(Blast,"models/props_debris/concretefloor020a")
    }
    if(Boom){
        T=T*1+0.1
        holoScale(Bum,vec(T,T,T))
    }
    if(T>=60 | !Shoot | !Boom){
        T=0
        holoDelete(Bum)
    }
    }
    elseif(Idle){
        holoPos(1,O:toWorld(vec(-10,0,40-(O:isCrouch()*20))))
        holoAng(1,O:toWorld(ang(0,0,45)))
    }
    
        holoParent(Nose,holoEntity(Hull))
        holoModel(Nose, "dome")
        holoScale(Nose, vec(0.5,0.5,0.5))
        holoPos(Nose,holoEntity(Hull):toWorld(vec(0,0,12)))
        holoColor(Nose,vec(50,50,50))
        holoAng(Nose,holoEntity(Hull):angles())
    
        holoColor(Hull,vec(50,50,50))
        
        holoParent(Flame,Hull)
        holoColor(Flame,vec(255,0,0))
        holoModel(Flame,"dome")
        holoPos(Flame,holoEntity(Hull):toWorld(vec(0,0,-12)))
        holoScale(Flame,vec(0.5,0.5,2))
        holoAng(Flame,holoEntity(Hull):angles()+ang(180,0,0))
    
    if(duped()){selfDestructAll()}
    Idle:

    Ready:

    Locked on Ball:


    Other Pics:






    I can has ?
    Last edited by xThaWolfx; 03-19-2010 at 08:35 AM.

  2. #2
    Wire Sofaking Jack37's Avatar
    Join Date
    Jul 2009
    Location
    In front of Tatra T6A5
    Posts
    780

    Default Re: xThaWolfx Holographic RocketLauncher

    So you released this
    Really great
    I like the code



    Wanna add me?:


    My Apps: Adv. Dupe -> E2 Code

  3. #3
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: xThaWolfx Holographic RocketLauncher

    You could put the first 7 lines of code into the same first() statement, they're just wasting ops at the moment.

    The Olympus Technologies drones, totally not SkyNet in Gmod form.
    Cronus: The Ultimate Drone, definitely SkyNet in Gmod form.
    The gBrain Project, the drone controls system that thinks it's better than you

  4. #4
    Wire Amateur xThaWolfx's Avatar
    Join Date
    Sep 2009
    Location
    The Netherlands
    Posts
    41

    Default Re: xThaWolfx Holographic RocketLauncher

    Thanks changed it

  5. #5
    Wiremod Helper Lyinginbedmon's Avatar
    Join Date
    Mar 2009
    Location
    England
    Posts
    2,659

    Default Re: xThaWolfx Holographic RocketLauncher

    Mouse2 and Use shouldn't be in the first() statement, they'll only be declared when the chip boots there, and you need them for continued function.

  6. #6
    Wire Sofaking Unsmart's Avatar
    Join Date
    Dec 2008
    Location
    Belgium OR BANland
    Posts
    1,965

    Default Re: xThaWolfx Holographic RocketLauncher

    Why do I get the feeling that you copied my idea........ -> disarm mode
    New server IP: 89.238.160.17:27018
    Hologram contraptions 1 Holo contraptions 2 EGP stuff Holo minigun Holo javelin rocket launcher
    Unsmart: I doubt the intelligence of some people.
    Drunkie: Nobody could have said that any better than Unsmart.

    Unsmart: Solece, I totally did your mom yesterday
    Solece: Who hasnt

    Divran: there are more retarded people than there are clever people in this world

  7. #7
    Wire Amateur xThaWolfx's Avatar
    Join Date
    Sep 2009
    Location
    The Netherlands
    Posts
    41

    Default Re: xThaWolfx Holographic RocketLauncher

    I only added that to get the rocket launcher out of your face and non-usable when trying to create an e2 because otherwise everytime you rightclick it shoots ^^

  8. #8
    Wire Noob komackboy's Avatar
    Join Date
    Mar 2010
    Posts
    1

    Default Re: xThaWolfx Holographic RocketLauncher

    No work when i try to paste it.

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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