+ Reply to Thread
Results 1 to 3 of 3

Thread: Lua editing-weapon-Need help

  1. #1
    Wire Sofaking BlackholeWM's Avatar
    Join Date
    Dec 2008
    Posts
    805

    Default Lua editing-weapon-Need help

    Hi, I am quite new to editing lua's, and recently I have been editing a script out of a tutorial.

    I want to know how to get the primary fire to be a fusion explosion, like with the fusion-bomb gun.

    (I just want the effect, I think I have the sound and I like the damage etc. as it is)

    Here is the contents 'Shared.lua' file:
    Code:
    SWEP.Author = "BlackholeST"
    SWEP.Contact = "I am not saying : )"
    SWEP.Purpose = "Have fun and KILL PEPOLE!!!"
    SWEP.Instructions = "Primary to BLOW STUFF UP! Secondary to BLAST STUFF WITH BULLETS!"
    SWEP.Category = "Superpower fists" 
    
    SWEP.Spawnable = true;
    SWEP.AdminSpawnable = true; 
    SWEP.ViewModel = "models/weapons/v_hands.mdl";
    SWEP.WorldModel = "models/weapons/w_hands.mdl";
    
    SWEP.Primary.Sound			= Sound( "ambient/explosions/explode_2.wav" )
    SWEP.Primary.ClipSize = -1;
    SWEP.Primary.DefaultClip = -1;
    SWEP.Primary.Automatic = true;
    SWEP.Primary.Ammo = "none";  
    
    SWEP.Secondary.Sound			= Sound( "ambient/explosions/explode_2.wav" )
    SWEP.Secondary.ClipSize = -1;
    SWEP.Secondary.DefaultClip = -1;
    SWEP.Secondary.Automatic = false;
    SWEP.Secondary.Ammo = "none"; 
    
    SWEP.Sound = Sound ("ambient/explosions/explode_2.wav")
      SWEP.Damage = 5000
      SWEP.Spread = 5000
      SWEP.NumBul = 1
      SWEP.Delay = 0.7
      SWEP.Force = 5000
    
    function SWEP:Deploy()
    return true
    end
     
    function SWEP:Holster()
    return true
    end
     
    function SWEP:Think()
    end
    
    //KILL PEOPLE
    
    function SWEP:PrimaryAttack()
       
    local eyetrace = self.Owner:GetEyeTrace();
       
    self.Weapon:EmitSound ( self.Sound )
       
    self.BaseClass.ShootEffects (self);
      
    local explode = ents.Create( "env_explosion" )
    explode:SetPos( eyetrace.HitPos )
    explode:SetOwner( self.Owner )
    explode:Spawn()
    explode:SetKeyValue( "iMagnitude", "5000" )
    explode:Fire( "Explode", 0, 0 )
    explode:EmitSound( "weapon_AWP.Single", 5000, 5000 )  
    
    self.Weapon:SetNextPrimaryFire( CurTime() + self.Delay )
      
    self:TakePrimaryAmmo(0)
      
    end
    
    function SWEP:Reload()
    self.Weapon:DefaultReload( ACT_VM_RELOAD )
    
    end
    Last edited by Azrael; 12-21-2008 at 08:09 AM. Reason: Added [code] tags.

  2. #2
    GMech Developer InfectiousFight's Avatar
    Join Date
    Jun 2007
    Location
    Houston, TX
    Posts
    537

    Default Re: Lua editing-weapon-Need help

    wiremod.com isn't really the place to ask for LUA help; that's what facepunch is for. I'm sure some people here could help you but you'd get more help there.

  3. #3
    Wire Sofaking Hitman271's Avatar
    Join Date
    Feb 2008
    Location
    Why? You looking for somebody?
    Posts
    731

    Default Re: Lua editing-weapon-Need help

    This should be moved to the lua section.

    Look in the wire lua for swep luas. Find whatever swep does the "fusion gun explosion" then copy and paste parts from that into your code.
    Quote Originally Posted by Anticept View Post
    This is not some place where you can toss your dick around and expect people to suck it.
    Community Gpu Thread. Post Yours!

    Bouncy Ball

+ Reply to Thread

Similar Threads

  1. How do I dupe a weapon?
    By Captain Maim in forum Installation and Malfunctions Support
    Replies: 7
    Last Post: 11-11-2008, 12:12 AM
  2. Sometimes I can't switch my weapon?
    By Rephindel in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 07-19-2008, 01:53 PM
  3. weapon scriplet request
    By Jarviar in forum Off-Topic
    Replies: 16
    Last Post: 07-17-2008, 09:16 PM
  4. Editing program
    By soulie in forum Off-Topic
    Replies: 5
    Last Post: 11-21-2007, 10:44 AM
  5. Editing Adv Dup Text FIle
    By Xechorizo in forum Installation and Malfunctions Support
    Replies: 9
    Last Post: 09-15-2007, 10:06 PM

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