Home Showcase
Welcome to the new Diaspora forums, please let us know if you see anything broken! Notice: Some users may need to reupload their avatars due to an issue during forum setup!

Phase-Inducer Tool, building utility e2

MrStumpMrStump Registered Posts: 24
edited July 2011 in Showcase #1
WHAT IS IT?: Basically, it just makes prop not solid when you grab then with your phys gun. Perfect for placing things inside of a ship or moving props through lots of other props without having to no-collide it to everything else. You can also deactivate it by pressing USE on the base in case you don't want a prop going not-solid on you when you physgun it.

Just a neat utility idea I had earlier today when watching Radio jam some props inside his ship and I figured others would find it equally useful. Enjoy.
@name Phase-Inducer Tool - by MrStump
@persist OnOff Toggle Use [Owner Prop E2]:entity
@model models/Tiberium/small_growth_accelerator.mdl

############################################################
# How To Use:                                              #
#  Simply spawn this e2 anywhere in the world and from     #
#  then on, when you move props you own with your physgun, #
#  they will not touch anything else until they are        #
#  released. If you desire to deactivate the phasing       #
#  function temporarily, press E on the unit to power it   #
#  down, and E on it again to power it back up. Enjoy      #
############################################################

interval(30)

if(first()|dupefinished()){
    OnOff = 1
    Owner = owner()
    E2    = entity()
    E2:setColor(vec(255,255,255))
    soundPlay(1,2,"buttons/combine_button_locked.wav")
}

Use    = clamp(Owner:keyUse(),0,1)

if(Use&$Use){
    if(Owner:aimEntity()==E2){
        if(OnOff){
            E2:setColor(vec(80,80,80))
            OnOff=0
            soundPlay(1,2,"buttons/combine_button2.wav")
        }
        else{
            E2:setColor(vec(255,255,255))
            OnOff=1
            soundPlay(1,2,"buttons/combine_button_locked.wav")
        }
    }
}

if(OnOff){
    Weapon = Owner:weapon():type()
    if(Weapon == "weapon_physgun" ){
        Mouse1 = Owner:keyAttack1()
        if(Mouse1){
            if(Prop == noentity()){
                Prop = Owner:aimEntity()
            }
            else{
                if(Toggle==0){
                    if(Prop:owner()==Owner){
                        Prop:setSolid(0)
                        E2:setColor(170,255,170)
                        Toggle=1
                    }
                    else{Prop=noentity()}
                }
            }
        }
        else{
            if(Toggle){
                Prop:setSolid(1)
                Prop = noentity()
                E2:setColor(255,255,255)
                Toggle=0
            }
        }
    }
}

Comments

  • Mouldy_TacoMouldy_Taco Registered, Moderator Posts: 133
    Very nice idea, which someone already decided to make an addon for!

    There is a mod called Physgun Buildmode(Which I don't personally use myself) that has several options centered around making physgunning easier, and already does this.
    "If this works, it'll keep us from getting' caught. If it doesn't, it'll keep us from gettin' old," -- MacGyver
  • Nielk1Nielk1 Registered, Administrator Posts: 252
    I can see some cool extensions of this though.

    Do check the server hooks though, I think I have an OnPhysgunPickup @ least. Main issue with my hooks I wrote is some didn't work (and thus are not on the server, making odd gaps like having pickup detection with the physgun but not the phycannon, etc).
  • viperfan7viperfan7 Registered Posts: 60
    I think those who like this E2 will like this addon then

    http://www.facepunch.com/threads/889029 ... uild-Tools

    in that post theres something called physgun build mode, it has this capability built in, along with a few others, like customizable rotation and position snap
  • MacTrekkieMacTrekkie Registered Posts: 12
    The problem with physgun buildmode is it doesn't let you place parts inside the map. This tool does. THAT is why it is useful and why I thankfully download this so I don't have to advanced ballsocket everything to the ground if it is supposed to collide with it.
    "To the last, I grapple with thee; from hell's heart, I stab at thee; for hate's sake, I spit my last breath at thee."
    -Moby Dick

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file