Garry's Mod

Garry's Mod

Melonbomber
Star of Remphan 2014 年 7 月 20 日 上午 12:30
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.
最后由 Star of Remphan 编辑于; 2014 年 7 月 20 日 上午 12:33
< >
正在显示第 1 - 2 条,共 2 条留言
Star of Remphan 2014 年 7 月 20 日 上午 2:04 
Figured it out :)

Now I would love to lean how to add upgrades.
Elotero 2014 年 12 月 17 日 下午 1:37 
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),
< >
正在显示第 1 - 2 条,共 2 条留言
每页显示数: 1530 50