Forum

> > Carnage Contest > Weapon scripting
Forums overviewCarnage Contest overviewLog in to reply

English Weapon scripting

1 reply
To the start Previous 1 Next To the start

old Weapon scripting

Su1c1d3
User Off Offline

Quote
Let's say I want to make a new weapon for Carnage Contest and i copy the Machine Gun.lua and change the name , the .bmp , the sound , the damage and the magazine size.So if i change the lines where "cc.mg.attack" appears and i change it to
"cc.rifle.attack" for example , is it going to work?

old Re: Weapon scripting

DC
Admin Off Offline

Quote
yeah of course. but note that:

• you should also change the "cc". it's something like a namespace to avoid conflicts with weapons that have the same name. best is to use your nick or something like that instead of "cc" (so for example: suicide.rifle.attack)

• you will have to edit
1
2
3
if cc==nil then cc={} end
cc.mg={}
cc.mg.bullet={}
accordingly

• of course you will have to add your new weapon to the weaponset. otherwise you will not see it in-game
To the start Previous 1 Next To the start
Log in to replyCarnage Contest overviewForums overview