• Insectoid SNPC Pack, Demon Era SNPC Pack And Pets Pack!
    31 replies, posted
Hi! I Know You`re Thinking "What An Idiot" or "Get Out" But Before Any... I Have Attempted Advanced Lua But It Has Not Gone Right... At All! I Have Had Two Testers... Viper_123 SWE And Vrej - They Have Both Sent Confirmation Of ERROR Or Not Spawning. These SNPC's Codes Will Look Alot Like Silverlan's... Lets Just Say I Am A Slow Learner... If Anybody Can Help... I Will Post A Link
So wait, you made some npc packs and they don't work? I don't really understand the question...
[QUOTE=Camdude90;31995898]So wait, you made some npc packs and they don't work? I don't really understand the question...[/QUOTE] Well... I Have Worked On Lots Of SNPCs For A long Time... And I Dont Want Any To Go To Waste... So I Am Asking A Pro...
You need to provide much more information, no answer fits all. Also, do you have a problem with your keyboard. Your capitalizing every word.
As killer have stated, you need to provide allot more information, starting with showing us the error and the code. SNPC's are not very easy for beginners to start learning Lua with. So I'd suggest making something that won't be released, something you can practice on. Some simple entities, like weapons, until you'll get the hang of it, only then continue onto something more complex as SNPC's. Cause how you're doing it now obviously does not work out for you very well. How many releases have you made of just crap utter crap and stolen SNPC's? Listening to what we're saying, we're not being harsh, we're stating that you should learn more before attempting and releasing not even working SNPC's. And [U]please[/U] stop capping every first letter of each of your word.
[QUOTE=freemmaann;32006897]As killer have stated, you need to provide allot more information, starting with showing us the error and the code. SNPC's are not very easy for beginners to start learning Lua with. So I'd suggest making something that won't be released, something you can practice on. Some simple entities, like weapons, until you'll get the hang of it, only then continue onto something more complex as SNPC's. Cause how you're doing it now obviously does not work out for you very well. How many releases have you made of just crap utter crap and stolen SNPC's? Listening to what we're saying, we're not being harsh, we're stating that you should learn more before attempting and releasing not even working SNPC's. And [U]please[/U] stop capping every first letter of each of your word.[/QUOTE] No Stealing, ALL My Code... Just Supposed to be different than my others so people would stop filling the inbox with hate mail... This Is My Code! And Ok... I Cant Stop The Habit, The Keyboard Is`nt Broken... Will Everybody Just Accept? Here Is A Bit Of Code: //AddCSLuaFile( "cl_init.lua" ) //AddCSLuaFile( "shared.lua" ) include('shared.lua') ENT.bPlayDeathSequence = true ENT.SpawnRagdollOnDeath = true ENT.iClass = CLASS_SPIDER ENT.Bleeds = true ENT.iBloodType = BLOOD_COLOUR_GREEN ENT.fRangeDistance = 564 ENT.fMeleeDistance = 254 ENT.Model = "models/npc/spider_monster/npc_spider_monster.mdl" ENT.DeathActChance = 100 ENT.tblDeathActivities = { [HITBOX_GENERIC] = ACT_DIESIMPLE } ENT.sSoundDir = "npc/spidermonster/" ENT.tblSourceSounds = {} ENT.tblSourceSounds["Attack"] = "spidermonster_striking1.wav" ENT.tblSourceSounds["Alert"] = "spidermonster_hail2.wav" ENT.tblSourceSounds["Idle"] = "spidermonster_misc0.wav" ENT.tblSourceSounds["Death"] = "spidermonster_dying2.wav" ENT.tblSourceSounds["Hurt"] = "spidermonster_ouch_strong0.wav" ENT.tblSourceSounds["Foot"] = "spidermonster_foothit0.wav" ENT.tblSourceSounds["Eat"] = "spidermonster_eat.wav"
I wouldn't call that code, you're just defining some variables. Where are they used? How? Whats the error? Be more cooperative if you want help.
[QUOTE=freemmaann;32009847]I wouldn't call that code, you're just defining some variables. Where are they used? How? Whats the error? Be more cooperative if you want help.[/QUOTE] Should I post A Link For The Spidermonster? (Code)
[QUOTE=angrypepper;32008670]No Stealing, ALL My Code... Just Supposed to be different than my others so people would stop filling the inbox with hate mail... This Is My Code! And Ok... I Cant Stop The Habit, The Keyboard Is`nt Broken... Will Everybody Just Accept?[/QUOTE] If It Were All Your Code You'd Realize That Lua Is Case-Sensitive. Take freemmaann's advice, please. If you can't script, don't pretend that you can. Learn to script and maybe people will take you seriously. Start with: wiki.garrysmod.com/?title=Lua_Tutorial_Series ...or: [url]http://www.lua.org/pil/[/url]
[QUOTE=Blargh123;32013882]If It Were All Your Code You'd Realize That Lua Is Case-Sensitive. Take freemmaann's advice, please. If you can't script, don't pretend that you can. Learn to script and maybe people will take you seriously. Start with: wiki.garrysmod.com/?title=Lua_Tutorial_Series ...or: [url]http://www.lua.org/pil/[/url][/QUOTE] I Am Careful With Codes... I Only Put Caps In Codes When Needed
ok so for us to awnser your question you have to tell us, WHAT EXACTLY IS HAPPENING? NOT VAUGE DETAILS, WHAT [U]EXACTLY[/U] IS GOING ON? then we might be able to answer
[QUOTE=kig717;32032382]ok so for us to awnser your question you have to tell us, WHAT EXACTLY IS HAPPENING? NOT VAUGE DETAILS, WHAT [U]EXACTLY[/U] IS GOING ON? then we might be able to answer[/QUOTE] I Have Written The Codes For A Ton Of Codes... Only Four Of Wich Spawn At All (But As Errors) The Code Was Written By Me, It Isnt Just Variables... It Was All Of The Other Random Crap You Need In Lua... I Dont See What Isnt Clear... I Am Offering If Anybody Can See The Code... So Anybody?
what isn't working? also Stop Typing Like This, It's Annoying.
[QUOTE=angrypepper;32038234]I Have Written The Codes For A Ton Of Codes... Only Four Of Wich Spawn At All (But As Errors) The Code Was Written By Me, It Isnt Just Variables... It Was All Of The Other Random Crap You Need In Lua... I Dont See What Isnt Clear... I Am Offering If Anybody Can See The Code... So Anybody?[/QUOTE] You've made it extremely obvious time and time again that it isn't your code (Based on what I've seen, you "borrow" heavily from Silverlan and Xystus...) and that you have absolutely no clue what the heck you're doing. Start from the ground up and things will be much easier on you. Nobody can give you any more help than that, believe me.
I Have Made A Code Wich Should Be Functioning Perfectly... What Havent I Explained? They Just Dont Spawn! No Idea... And Blargh... I Know You Helped Silverlan (I Think You Are) And I Know You Are Protecting Him... But Learning Is`nt Something To Get Annoyed Over... If That`s The Case... I Also Dont Know Why People Wont Accept The Fact That This Is Mostly My Code... So Does Anybody Want The Motherfucking Code?
Probably cause you're stalling and the code you did show I wouldn't even call code, just defining some variables. If you can't even spawn the thing how are we to believe that you are capable of doing anything besides changing some variable options in Lua? Your reputation certainly proves that you love to steal things.
[QUOTE=freemmaann;32042973]Probably cause you're stalling and the code you did show I wouldn't even call code, just defining some variables. If you can't even spawn the thing how are we to believe that you are capable of doing anything besides changing some variable options in Lua? Your reputation certainly proves that you love to steal things.[/QUOTE] Not Just Variables... There Is LOTS In The Code! I Didnt Steal Anything! Now Help Me Or Just Go Away T_T I Didnt Steal Anything... Stop Predicting What You Dont Know And look! I Am Offering Anybody the Code... Why Wont People Just Examine The GodDamned Code? And I Dont Love To Steal ANYTHING!
So just show it already then!
[QUOTE=freemmaann;32053134]So just show it already then![/QUOTE] Finally... Here: (Note This Is "init.lua, shared.lua, cl_init.lua Of The Spidermonster Code) [url]http://uploading.com/files/e532d71b/spidermonsterluas.rar/[/url]
What do you mean finally? That's what you were supposed to do in the first post. Well, not exactly. I am not downloading that, post the code within this forum, don't upload, like you did for your variables and using /[Lua] tags.
/[Lua] //AddCSLuaFile( "cl_init.lua" ) //AddCSLuaFile( "shared.lua" ) include('shared.lua') ENT.bPlayDeathSequence = true ENT.SpawnRagdollOnDeath = true ENT.iClass = CLASS_SPIDER ENT.Bleeds = true ENT.iBloodType = BLOOD_COLOUR_GREEN ENT.fRangeDistance = 564 ENT.fMeleeDistance = 254 ENT.Model = "models/npc/spider_monster/npc_spider_monster.mdl" ENT.DeathActChance = 100 ENT.tblDeathActivities = { [HITBOX_GENERIC] = ACT_DIESIMPLE } ENT.sSoundDir = "npc/spidermonster/" ENT.tblSourceSounds = {} ENT.tblSourceSounds["Attack"] = "spidermonster_striking1.wav" ENT.tblSourceSounds["Alert"] = "spidermonster_hail2.wav" ENT.tblSourceSounds["Idle"] = "spidermonster_misc0.wav" ENT.tblSourceSounds["Death"] = "spidermonster_dying2.wav" ENT.tblSourceSounds["Hurt"] = "spidermonster_ouch_strong0.wav" ENT.tblSourceSounds["Foot"] = "spidermonster_foothit0.wav" ENT.tblSourceSounds["Eat"] = "spidermonster_eat.wav" ENT.iAlertRandom = 1 function ENT:OnInit() self:SetHullType(HULL_LARGE) self:SetHullSizeNormal() self:SetCollisionBounds(Vector(120, 120, 140), Vector(-120, -120, 0)) self:CapabilitiesAdd(CAP_MOVE_GROUND | CAP_OPEN_DOORS) self:SetHealth(GetConVarNumber("sk_dmm_spidermonster_health")) self:SetSoundLevel(100) end local function CreateRagdoll(ent) local ragdoll = ents.Create("prop_ragdoll") ragdoll:SetModel(ent:GetModel()) for i = 1, 3 do ragdoll:SetBodygroup(i, ent:GetBodygroup(i)) end ragdoll:SetPos(ent:GetPos()) ragdoll:SetAngles(ent:GetAngles()) ragdoll:Spawn() local entVel local entPhys = ent:GetPhysicsObject() if entPhys:IsValid() then entVel = entPhys:GetVelocity() else entVel = ent:GetVelocity() end for i=0,ragdoll:GetPhysicsObjectCount() -1 do local bone = ragdoll:GetPhysicsObjectNum(i) if ValidEntity(bone) then local bonepos, boneang = ent:GetBonePosition(ragdoll:TranslatePhysBoneToBone(i)) bone:SetPos(bonepos) bone:SetAngle(boneang) bone:AddVelocity(entVel) end end if string.find(sEvent,"mattack") then local fDist = self.fMeleeDistance +12 local dmg local viewPunch if string.find(sEvent, "bite") then dmg = GetConVarNumber("sk_dmm_spidermonster_dmg_bite") viewPunch = string.find(sEvent, "biteA") && Angle(-30,0,0) || Angle(-15,30,-3) else local posDmg = self:GetMeleePos() local posSelf = self:GetPos() local posSelfCenter = posSelf +self:OBBCenter() for _, ent in pairs(ents.FindInSphere(posDmg,fDist)) do if ValidEntity(ent) && self:IsEnemy(ent) && self:Visible(ent) && ent:Health() > 0 && self:CanEat(ent) then local posEnemy = ent:GetPos() local angToEnemy = self:GetAngleToPos(posEnemy).y if (angToEnemy <= 54 && angToEnemy >= 0) || (angToEnemy>=234) then local dmg = GetConVarNumber("sk_dmm_spidermonster_dmg_eat") local posDmg = ent:NearestPoint(posSelfCenter) local dmgInfo = DamageInfo() dmgInfo:SetDamage(dmg) dmginfo:SetAttack(self) dmginfo:SetInflictor(self) dmginfo:SetDamageType(DMG_SLASH) dmginfo:SetDamagePosition(posDmg) ent:TakeDamageInfo(dmgInfo) if ent:Health() <= 0 then local ragdoll = CreateRagdoll(ent) self.tgtBloodCol = ent.iBloodType || ent:GetBloodColor() self.tgtRagdoll = ragdoll ragdoll:NoCollide(self) self:DeleteOnDeath(ragdoll) if !ent:IsPlayer() then ent:Remove() else local plRagdoll = ent:GetRagdollEntity() if ValidEntity(plRagdoll) then plRagdoll:Remove() end ent:Spectate(OBS_MODE_CHASE) ent:SpectateEntity(ragdoll) end end break end end end return end pos = pos:GetNormalized() *2000 +Vector(0,0,300 *(pos:Length() /2000)) for i = 0, 5 do local spitball = ents.Create("grenade_spit") spitball:NoCollide(self) spitball:SetPos(self:GetPos() +self:GetForward() *20 +self:GetUp() *20) spitball:SetEntityOwner(self) spitball:Spawn() local phys = spitball:GetPhysicsObject() if ValidEntity(phys) then phys:SetVelocity(pos +VectorRand() *60) end end end elseif string.find(sEvent, "poison") then if string.find(sEvent, "start") then self.bPoisonSpray = true else self.bPoisonSpray = false end end end function ENT:OnThink() if self.bPoisonSpray then local iAtt = 1 local att = self:GetAttachment(iAtt) local effect = EffectData() effect:SetStart(att.Pos) effect:SetNormal(att.Ang:Forward()) effect:SetEntity(self) effect:SetAttachment(iAtt) util.Effect("effect_spidermonster_poison",effect) local posSelf = self:GetPos() for k, v in pairs(ents.FindInSphere(att.Pos,self.fRangeDistance +250)) do if ValidEntity(v) && self:Visible(v) && v:VisibleVec(att.Pos) && v != self && (self:IsEnemy(v) || v:IsPhysicsEntity()) then local posEnemy = v:GetPos() local yaw = self:GetAngles().y -(posEnemy -posSelf):Angle().y if yaw < 0 then yaw = yaw +360 end if (self.attackDir == 0 && (yaw <= 20 || yaw >= 340)) || (self.attackDir == 1 && yaw <= 75) || (self.attackDir == 2 && yaw >= 285) then local dmgInfo = DamageInfo() dmgInfo:SetDamage(GetConVarNumber("sk_dmm_spidermonster_dmg_poison")) dmgInfo:SetAttacker(self) dmgInfo:SetInflictor(self) dmgInfo:SetDamageType(DMG_ACID) dmgInfo:SetDamagePosition(v:NearestPoint(att.Pos)) v:TakeDamageInfo(dmgInfo) if v:GetClass() == "npc_turret_floor" && !v.bSelfDestruct then v:Fire("selfdestruct", "", 0) v:GetPhysicsObject():ApplyForceCenter(self:GetForward() *10000) v.bSelfDestruct = true end end end end end
Just give up already. I can easily tell that most of that is taken straight out of one of my old SNPCs and it wouldn't even work if you didn't have my SLVBase addon. Just stop.
[QUOTE=Silverlan;32057836]Just give up already. I can easily tell that most of that is taken straight out of one of my old SNPCs and it wouldn't even work if you didn't have my SLVBase addon. Just stop.[/QUOTE] I Wasnt Taking Anything... I Was Trying To Learn From People... And I Honestly Thought The Code Would Be Resourceful... And Yes, I Do Confess To Using A Bit Of Code... But I Patched It All Together To Try And Make Something Advanced For A Change...
Well there's your problem, stop ignoring what we say and start with something simpler. You just steal and upload someone else's hard work without even giving them the credits. That's not a good way to learn.
[QUOTE=freemmaann;32058079]Well there's your problem, stop ignoring what we say and start with something simpler. You just steal and upload someone else's hard work without even giving them the credits. That's not a good way to learn.[/QUOTE] Last Thing I`ll Say, I Have Admited To Using A Bit Of Someones Code... You Did`nt Think I Wasnt Going To Give Credits? I Was Mixing In A Bit Of Advanced With Normal... Either Way, I Am Not An Active Gmodder Now...
Missing the start with something simpler part again.
It`s Like Everybody is Asking Me To Go And Die... And Dont Reply To That If You Are Going To Say "Please Do" Or Something
Another hostile kid that takes criticism negatively? Oh, bother. We aren't telling you to go die. We're telling you to stop using other people's code and make something of your own - from scratch. Start small and work your way up, if you will.
Depending on what your interested in (ents, gamemodes or sweps) you should start with designing something yourself from a skeleton code (like this for gamemodes: [url]http://www.garrysmod.org/downloads/?a=view&id=39584[/url] or this for sweps: [url]http://www.garrysmod.org/downloads/?a=view&id=24031[/url]) or look up tutorials on youtube. Also, try to use gmod wiki ([url]http://wiki.garrysmod.com/?title=Getting_Started_With_Lua[/url]) and this lua search engine that Overv made: ([url]http://luasearch.overvprojects.nl/[/url]). There's lots of help you can get, but you have to be determined to spend many months working on a script. You can learn stuff as you go, but it's a very long process to start off on something complicated. If you get good at lua you'll be able to do complicated scripts on a regular basis, but for starters, it'll take you at least a year to do something complicated straight up.
[QUOTE=Midtown123;32068851]Another hostile kid that takes criticism negatively? Oh, bother. We aren't telling you to go die. We're telling you to stop using other people's code and make something of your own - from scratch. Start small and work your way up, if you will.[/QUOTE] Ok... Sorry, I Just Though I`d Know What To Expect From Facepunch After Last Time... ([url]http://www.facepunch.com/threads/1073196-Left-4-Dead-Boomer-Snpc?p=28884282&highlight=[/url]) Thanks For Streightening It Out... [QUOTE=Zyler;32071488]Depending on what your interested in (ents, gamemodes or sweps) you should start with designing something yourself from a skeleton code (like this for gamemodes: [url]http://www.garrysmod.org/downloads/?a=view&id=39584[/url] or this for sweps: [url]http://www.garrysmod.org/downloads/?a=view&id=24031[/url]) or look up tutorials on youtube. Also, try to use gmod wiki ([url]http://wiki.garrysmod.com/?title=Getting_Started_With_Lua[/url]) and this lua search engine that Overv made: ([url]http://luasearch.overvprojects.nl/[/url]). There's lots of help you can get, but you have to be determined to spend many months working on a script. You can learn stuff as you go, but it's a very long process to start off on something complicated. If you get good at lua you'll be able to do complicated scripts on a regular basis, but for starters, it'll take you at least a year to do something complicated straight up.[/QUOTE] Hey, Thanks For The Links! (I`ve Never Seen Overvprojects :P) Well... Now I Know Where To Look, I`ll Start As Well As I Can :)
Sorry, you need to Log In to post a reply to this thread.