Garry's Mod

Garry's Mod

Melonbomber
MelonBomber Mods
I'm looking for more info on how to create more interesting bombs/powerups.
Is there anyone who can guide on how to do this? I've tested with say the Power Up line:

local pick = addPickup(2, "Power Up", Color(220,50,50), "models/props_junk/gascan001a.mdl")
pick.NoList = true
pick.Chance = 10
pick.Description = "Increases your bomb's power"
function pick:OnPickup(ply)
ply:SetBombPower(ply:GetBombPower() + 1)
end

I created another entry like:

local pick = addPickup(2, "Power Up", Color(220,50,50), "models/props_junk/gascan001a.mdl")
pick.NoList = true
pick.Chance = 1.3
pick.Description = "Increases your bomb's power x3"
function pick:OnPickup(ply)
ply:SetBombPower(ply:GetBombPower() + 3)
end

I can't change the "2" as that seems linked to the ID for "Power Up". I did change the color numbers to make the base colro gold. However this doesnt work and throws all sorts of errors.

I understand this isn't the most simple of things I'm asking and not much up to date with LUA but do have years of experience in C++ and VB. But havent really coded since college.
Last edited by Star of Remphan; 20 Jul, 2014 @ 12:33am
< >
Showing 1-2 of 2 comments
Star of Remphan 20 Jul, 2014 @ 2:04am 
Figured it out :)

Now I would love to lean how to add upgrades.
Elotero 17 Dec, 2014 @ 1:37pm 
Maybe posting your solution for others would be better than posting 'Figured it out'. Just sayin'.

For anyone who's reading this, its probably because OP neglected to change the new upgrade's title.

local pick = addPickup(2, "Power Up", Color(220,50,50),
< >
Showing 1-2 of 2 comments
Per page: 1530 50