Okay this is the first time I'm actually using Lua to code weapons and I have a few questions:
-What is the name of the AR2 Alt-Fire ammo?
-For the Alt-Fire I want to use the Antlion Worker Acid Attack what do I put for that?
-What is the sound for the Antlion Worker firing acid?
-What do I put to make the alt-fire have unlimited ammo?
-The Primary Attack is a laser what do I put for that?
BTW I am using this so I can get started: [url]http://www.garrysmod.org/downloads/?a=view&id=83426[/url]
Okay...thnx for the help if anyone can teach me let me know.
[URL=http://wiki.garrysmod.com/?title=Lua_Tutorial_Series]Help is here[/url]
[QUOTE=Dave_Parker;21098293]If you want to learn Lua, don't use SWEP creators...[/QUOTE]
It'll help for new people intill they can write one on there own.
[QUOTE=Cubar;21121722]It'll help for new people intill they can write one on there own.[/QUOTE]
Only if they ever actually open the file with a text editor:v: But this guy seems to be planning that so I approve:3:
[QUOTE=ralle105;21126018]Only if they ever actually open the file with a text editor:v: But this guy seems to be planning that so I approve:3:[/QUOTE]
No I don't use Text Editor I use SciTE for Coding with Lua I used it a few times for making classes for DarkRP plus a few custom weapon shipments too. Oh btw heres what I got so far: SWEP.PrintName = "Geiger Rifle"
SWEP.Author = "ventxekart"
SWEP.Instructions = "Primary Attack fires a single laser blast, Secondary Attack fires an acidic blast that causes minor radiation damage."
SWEP.Contact = "ventxekart@gmail.com"
SWEP.Purpose = "This is my first SWEP so I decide to show it to the public, I give thanks to everyone at facepunch that gave me a hand with the coding."
SWEP.AdminSpawnable = true
SWEP.Spawnablee = true
SWEP.ViewModelFOV = 55
SWEP.ViewModel = "model/Plasma Weaponry/plasma rifle.mdl"
SWEP.WorldModel = "model/Plasma Weaponry/plasma rifle.mdl"
SWEP.AutoSwitchTo = false
SWEP.AutoSwitchFrom = true
SWEP.Slot = 3
SWEP.SlotPos = 3
SWEP.Hold Type = "AR2"
SWEP.FiresUnderwater = true
SWEP.Weight = 20
SWEP.DrawCrosshair = true
SWEP.Category = Ventxekarts Alien Weaponry
SWEP.DrawAmmo = true
SWEP.ReloadSound = "sound/jaanus/ep2sniper_relod.wav"
SWEP.base = "weapon_base"
function SWEP:PrimaryAttack()
local effectdata = EffectData()
effectdata:SetOrigin( hitpos )
effectdata:SetStart( self.Owner:GetShootPos() )
effectdata:SetAttachment( 1 )
effectdata:SetEntity( self.Weapon )
util.Effect( "ToolTracer", effectdata )
end
function SWEP: Secondaryattack()
local effect
SciTE is a text editor...
[QUOTE=|King Flawless|;21137920]SciTE is a text editor...[/QUOTE]
It is? Huh, never knew that.
If you [B]edit text[/B] with it, it is a [B]text editor[/B].
Alright I get it now, but does anyone see any errors with the code or not? I am continuing to work on it right now if anyone sees any errors on that piece of code let me know.
Sorry, you need to Log In to post a reply to this thread.