• Cactus!
    62 replies, posted
I am good at effects, but sweps are just easy and a pain in the ass to do. Anyone wanna make a vacuum weapon? Maybe someone could model a vacuum swep for me? Actually, for an effect, does anyone want to make a fuse that sparkles for the bomb cactus? Here's a list of effects I'm working on: [list] [*]Needle Trail: A trail of cactus needles left behind when they fly. [*]Sparkle Trail: A golden sparkling trail left behind by the golden cactus. [*]Fuse: A little fuse on top of the bomb cactus that sparkles. [*]Explosion: A custom explosion effect. I'm thinking something involving cactus needles. [*]Spawn: Some kind of cool spawn effect for the cacti. Maybe a bunch of leaves or something that flutter outward and then fade away. [*]Captured: Some pretty effect signifying that you caught a cactus. Not sure what would look best. [*]Glow: A glowing aura around each cactus. [/list] If anyone wants to make some of these for me that would be great. If not I'll work on them myself.
Cactus. Classic.
I've spent today redoing the gamemode because it broke. The code was messy anyways. I'm almost done. It's a lot more modular now. Anyways, I need more ideas for upgrades now. Anyone got any ideas?
Are upgrades like quick powerups, or do they last for the entire game?
[QUOTE=Nerdboy;15222297]Are upgrades like quick powerups, or do they last for the entire game?[/QUOTE] Some do and some don't. I just want ideas. It could be a weapon, some kind of physical ability, they way you effect your environment, etc.. I just need ideas.
I also made upgrade effects passed through tables. Here is my source for the upgrades table: [lua] /*---------------------------------------------- You can make your own upgrades too! Syntax: name: The name you want inserted into chatprint. Keep in mind, it will be converted to all uppercase letters ("You have gained the "..NAME.." upgrade!"). desc: The description following the message. If you want to describe the effects to the player, this is the place to put them. func: The function that gets passed as the effects. The "self" argument will always be the player. ----------------------------------------------*/ upgrades = {} upgrades["speed"] = {name = "crazy speed", desc = "You can now run super fast!", func = function(self) self:SetRunSpeed(1000) end} upgrades["jump"] = {name = "super jump", desc = "You can now jump super high!", func = function(self) self:SetJumpPower(600) end} upgrades["grabber"] = {name = "grabber", desc = "For the next 15 seconds, any cactus that flies within a close proximity of you will automatically be captured!", func = function(self) self:SetCanAutoGrab(true) if ValidEntity(self) then timer.Simple(15, function() self:SetCanAutoGrab(false) end) end end} upgrades["health"] = {name = "health", desc = "Your health has been set to 200!", func = function(self) self:SetMaxHealth(200) self:SetHealth(200) end} [/lua] All you do is add a line and the game will do the rest. If you guys want to make some and give me some, that would be cool. If you have an awesome idea for one, please post it! I will make it if it sounds like a good idea!
Hey this gamemode is really fun i tried it :D .
Gah I've been looking for how to set health, run, jump and all that! I wanted to add a Convar for all of that in Cakescript but I couldn't find the correct code for it ><. Ah well, not I know :D, also Cactus cactus...cactus cactus cactus...bouncy cactus!
I'm adding some new upgrades. Invincibility, Flight, Invisibility, Bomb Detector, Shield, and Crystal Ball. Some may not be done for a little while, but I'll have some of the new ones up tonight. Will also have a new map on it tonight courtesy of matt wild. I've also made a new one. I'll probably add them all to the server tonight.
You should make it so when you catch a cactus, the velocity it has upon catching it is applied to you. If you are at standstill and you catch a fast one flying past, it send you flying too.
I'm not sure what the advantage of that would be, but with all the cacti being caught at once, it could lag eventually.
Maybe, but it would be as funny as hell to watch some player taking off into space because s/he caught a fast cactus XD
[QUOTE=thomasfn;15278865]Maybe, but it would be as funny as hell to watch some player taking off into space because s/he caught a fast cactus XD[/QUOTE] Maybe. I've got more new maps coming on the server. I'm also making updates on upgrades and such. Still trying to get that vacuum swep to work, but find in cone is broken. Anyone wanna help me with it? [lua] if ( SERVER ) then AddCSLuaFile( "shared.lua" ) end SWEP.PrintName = "Vacuum Cleaner" SWEP.Slot = 1 SWEP.SlotPos = 0 SWEP.DrawAmmo = true SWEP.DrawCrosshair = true SWEP.ViewModel = "models/weapons/v_pistol.mdl" //Will change this SWEP.WorldModel = "models/weapons/w_pistol.mdl" //Will change this function SWEP:Initialize() self:SetWeaponHoldType( "pistol" ) end local ShootSound = Sound( "Weapon_Pistol.NPC_Single" ) //Will change this SWEP.RunArmAngle = Angle( 70, 0, 0 ) SWEP.RunArmOffset = Vector( 25, 4, 0 ) /*--------------------------------------------------------- PRIMARY ---------------------------------------------------------*/ SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "none" function SWEP:PrimaryAttack() //Find in cone doesnt appear to work. My game froze. I am considering the use of a series of FindInSpheres. local ConeEnts = ents.FindInCone(self:GetOwner():GetShootPos(), self:GetOwner():GetAimVector(), 65535,200) for i, cactus in ipairs(ConeEnts) do if cactus:GetClass() == "cactus" then cactus.IsSpamming = 0 cactus:GetPhysicsObject():ApplyForceCenter( cactus:GetPos()-self.Owner:GetShootPos()*cactus:GetPos():Distance(self.Owner:GetShootPos()) ) if cactus:GetPos():Distance(self.Owner:GetShootPos()) < 50 then if cactus:GetCactusType() == "explosive" then cactus:GetPhysicsObject():ApplyForceCenter( VectorRand()*100 ) self.Owner:CaughtCactus(cactus) end end end end end /*--------------------------------------------------------- SECONDARY ---------------------------------------------------------*/ SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = true SWEP.Secondary.Ammo = "none" function SWEP:SecondaryAttack() //Not sure what this will do. //I may make a reverse on this vacuum and switch primary/secondary around. end [/lua]
the Maps were are also made by me don't forget that grea$emonkey.
[QUOTE=matt wild.;15279632]the Maps were are also made by me don't forget that grea$emonkey.[/QUOTE] Only one of them so far.
I've 90% done the second one :D
New syntax for upgrades: [lua] upgrades["flight"] = { name = "flight", desc = "For the next 15 seconds, you can fly!", func = function(self) if self:GetMoveType() == MOVETYPE_FLY then self:SetMoveType(MOVETYPE_WALK) end self:SetMoveType(MOVETYPE_FLY) timer.Simple( 15, function() upgrades["flight"]["func_undo"](self) end ) end, func_undo = function(self) if ValidEntity(self) then if self:GetMoveType() == MOVETYPE_FLY then self:SetMoveType(MOVETYPE_WALK) self:ChatPrint("FLIGHT has worn off.") self:RemoveUpgrade("flight") else return end end end } [/lua] This is especially for timed upgrades. [editline]03:11PM[/editline] Problem, cacti are not colliding with the map. I can't figure out why...
Odd......
I added new upgrades, fixed upgrades system, and have 3 maps to choose from. Drop by the server and see what's new: 74.63.224.141:27015
I need some help with a SENT/SWEP. I'm working on the "Chainlink" weapon which will shoot out a grappling hook and pull in cacti at long distances. Here is the SWEP shared.lua: [lua] if ( SERVER ) then AddCSLuaFile( "shared.lua" ) SWEP.HoldType = "ar2" SWEP.Weight = 5 end if ( CLIENT ) then SWEP.PrintName = "Chain Link" SWEP.DrawAmmo = true SWEP.DrawCrosshair = true SWEP.Slot = 1 SWEP.SlotPos = 0 end SWEP.Author = "Grea$eMonkey" SWEP.Contact = "" SWEP.Purpose = "Catch cacti." SWEP.Instructions = "Left click to shoot a chain at a cactus, and then reel it in." SWEP.ViewModel = "models/weapons/v_pistol.mdl" //Will change this SWEP.WorldModel = "models/weapons/w_pistol.mdl" //Will change this function SWEP:Initialize() if ( SERVER ) then self:SetWeaponHoldType( "ar2" ) end end local ShootSound = Sound( "Weapon_Pistol.NPC_Single" ) //Will change this /*--------------------------------------------------------- PRIMARY ---------------------------------------------------------*/ SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = -1 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "none" function SWEP:PrimaryAttack() if !SERVER then return end /*local dist = 9999 local ent = NULL local epos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*500 local tracker = {} tracker.start = self.Owner:GetShootPos() tracker.endpos = epos tracker.filter = self.Owner local tdata = util.TraceLine(tracker) if !tdata.Hit then epos = self.Owner:GetShootPos()+self.Owner:GetAimVector()*500 else epos = tdata.HitPos end local sphere = self.ents.FindInSphere(epos, 800) for k,v in pairs(sphere) do if v:GetClass() == "cactus" then if ent == NULL then if v:GetPos():Distance(epos) < dist then ent = v end else if v:GetPos():Distance(epos) < ent:GetPos() then ent = v end end end end*/ local trace = self.Owner:GetEyeTrace() local ent = trace.Entity if ValidEntity(ent) then if ent:GetClass() != "cactus" then return end if ent:GetCactusType() == "explosive" then return end if ent:GetPos():Distance(self.Owner:GetShootPos()) < 1000 then self.Owner:SetNWEntity("caughtcactus", ent) ent.IsSpamming = 0 local ghost = ents.Create("chainlink_ghost") ghost:SetPos(ent:GetPos()) ghost:SetNWEntity("cactuschild",ent) ghost:SetOwner(self.Owner) ghost:Spawn() ent:SetParent(ghost) end end end /*--------------------------------------------------------- SECONDARY ---------------------------------------------------------*/ SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = -1 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "none" function SWEP:SecondaryAttack() end function SWEP:Think() end [/lua] That extra commented out code in PrimaryAttack was made to find an entity to track if you miss. The chainlink_ghost entity is what would be fired to grab the cacti and pull it in. Here is the init.lua for it: [lua] AddCSLuaFile( "cl_init.lua" ) AddCSLuaFile( "shared.lua" ) include( 'shared.lua' ) function ENT:Initialize() self:SetModel( "models/props_lab/cactus.mdl" ) self:PhysicsInit( SOLID_VPHYSICS ) self:SetMoveType( MOVETYPE_CUSTOM ) self:SetSolid( SOLID_VPHYSICS ) local phys = self:GetPhysicsObject() if (phys:IsValid()) then phys:Wake() end self.Owner = self:GetOwner() self.Cactus = self:GetNWEntity("cactuschild") self.Caught = false self.ShadowParams = {} self.Entity:StartMotionController() end function ENT:Remove() end function ENT:Touch(hitEnt) if hitEnt == self.Owner then self.Owner:CaughtCactus(self.Cactus) SafeRemoveEntity(self) end end function ENT:Think() end function ENT:PhysicsSimulate( phys, deltatime ) phys:Wake() if !ValidEntity(self.Owner) then return SIM_NOTHING end self.ShadowParams.secondstoarrive = 5 // How long it takes to move to pos and rotate accordingly - only if it _could_ move as fast as it want - damping and maxspeed/angular will make this invalid self.ShadowParams.pos = self.Owner:GetPos() // Where you want to move to self.ShadowParams.angle = self.Owner:GetPos():Angle() // Angle you want to move to self.ShadowParams.teleportdistance = 0 // If it's further away than this it'll teleport (Set to 0 to not teleport) self.ShadowParams.deltatime = deltatime // The deltatime it should use - just use the PhysicsSimulate one phys:ComputeShadowControl(self.ShadowParams) ForceAngle = self.Owner:GetPos():Angle() ForceLinear = phys:WorldToLocalVector(self.Owner:GetPos() - self:GetPos()) return ForceAngle, ForceLinear, SIM_LOCAL_ACCELERATION end [/lua] As you can see it was meant to use custom physics to make a smooth path back. I tried both methods of PhysicsSimulate. Yes I did it with either commented out. It stayed frozen. If someone can find some method to get this to work, that would be great! I was hoping with PhysicsSimulate that it would use the tracking code to curve/follow after a nearby cacti. Then after catching said cacti, it would come back to the player. Remake both SENT and SWEP if you have to. I'm hoping to use some similar custom physics with the vacuum for realistic sucking powers.
u should make it that u get hit players with sweps wich makes them lose like 1 cacti note: new monitor wewt bday today!
I miss the smartness system.
Why not have upgrades in like function form like most gamemodes do nowadays. [b]example[/b] [lua] Upgrades = {} function AddUpgrade(name, desc, func, undo) nUpgrade = {} nUpgrade.Name = name nUpgrade.Desc = desc nUpgrade.Func = func nUpgrade.Undo = undo table.insert(Upgrades, nUpgrade) end AddUpgrade("Flight", "Fly for 15 seconds", function() //shit end, function() //moreshit end) --Usage.. for _, up in pairs(Upgrades) do print(up.Name) print(up.Desc) up.Func() up.Undo() end [/lua] Just a suggestion =P
I use a combination. [lua] function meta:RemoveUpgrade(strUpgrade) if table.HasValue(self.Upgrades, strUpgrade) then for a,b in pairs(upgrades) do if b["name"] == strUpgrade then b["func_undo"](self) for c,d in pairs(self.Upgrades) do if d == strUpgrade then table.remove(self.Upgrades,c) end end end end end end function meta:GiveValidUpgrade() local hasallupgrades = false local temp_upgrades = {} if #temp_upgrades == #upgrades then hasallupgrades = false else hasallupgrades = true end for k,v in pairs(upgrades) do if not table.HasValue(self.Upgrades, v["name"]) then table.insert(temp_upgrades,v) end end local allowed = table.Random(temp_upgrades) if hasallupgrades == false then self:AddUpgrade(allowed["name"]) allowed["func"](self) self:ChatPrint("You have gained the "..string.upper(allowed["name"]).." upgrade! "..allowed["desc"]) else self:ChatPrint("You have every upgrade!") end end [/lua]
Still, very nice work so far :D, once this is released it'll spread as quickly as the Ball Sell Systim...oh god I'm saying it now O_o.
LOL! I had to laugh when i saw this. It looks great, keep up the good work man :D
Version 1 of my Cactus gamemode for Fretta is done. No pretty HUD yet but this should be fun to play anyways. [url=http://www.garrysmod.org/downloads/?a=view&id=73937][img]http://www.garrysmod.org/img/?t=dll&id=73937[/img][/url]
Just awesome. You know why.
Did someone say cactus? I'd like to bid one hundred dollars on that, 4cactus. OH AND ZOMG TRACERS. I really spent 7:54 minutes of my life watching that video on page one. Ontopic: This gamemode is quite the fun, and people pick it 4 teh lulz when they are a bit bored and don't know what to pick.
[QUOTE=Odahilys;16292775]Did someone say cactus? I'd like to bid one hundred dollars on that, 4cactus. OH AND ZOMG TRACERS. I really spent 7:54 minutes of my life watching that video on page one. Ontopic: This gamemode is quite the fun, and people pick it 4 teh lulz when they are a bit bored and don't know what to pick.[/QUOTE] Awesome. That's what I was hoping.
Sorry, you need to Log In to post a reply to this thread.