Files

> > CS2D > Lua Scripts > [EngiN33R] Custom Weapons
Files overviewCS2D overviewLua Scripts overview

English [EngiN33R] Custom Weapons >

140 comments155 kb, 1,837 Downloads

old [EngiN33R] Custom Weapons

EngiN33R
Moderator Off Offline

Finally, I'm uploading the long-awaited (or not so much so now) script that is the custom weapons mod!

This modification allows you to add your very own weapons to the game. Naturally, owing to CS2D's limitations, it doesn't simulate real weapons to the fullest extent, but it's the first step toward that, and dare I say, quite a big one. Hopefully now all the whiners will stop whining as much.

Console commands >


To-do list:
flame Make custom weapons hurt buildings
flame Implement support for projectile-based custom weapons
flame Implement support for melee custom weapons
• Remove the bufferimg workaround and do the bloody thing properly

If you have the need to edit the script, the code is commented in the most part; if you do not understand something - let me know in PM. If you have, for some reason, the intention to upload your modified script - I do not prohibit that, just be so kind as to mention what you based your edit on.

This is, of course, a beta version, and its features are quite limited. I will continue developing it further, the next thing to do is to add projectile-based custom weapon functionality. Please do leave feedback and report bugs if such are found.

EDIT: My apologies, I've now uploaded the missing files. The archive should be complete now and the script should work properly.
Another missing sprite has been added for the ammo box.
edited 4×, last 05.07.12 05:57:14 pm
Approved by Yates

Download Download

155 kb, 1,837 Downloads

Comments

140 comments
Page
To the start Previous 1 2 3 4 5 6 7 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

michal16202
User Off Offline

not working, i copied all files and i was edit custom_weapons.lua
weapons = {
     [1] = {
          name = "M134 Minigun", --name
          sprite = "gfx/weapons/m134.bmp", --hold sprite
          sprited = "gfx/weapons/m134_d.bmp", --drop sprite
          snd = "weapons/m134.wav", --sound
          range = 500, --range of bullet
          ammo = 800, --ammo in clip
          maxammo = 9000, --carried ammo
          reloadt = 5000, --reload time
          sndrad = 400, --sound radius
          dmg = 21, --damage
          rid = 90, --real id; the actual weapon the player will have equipped
          disp = 4, --bullet dispersion
          burstmode = true, --burst mode available
          brf = 15, --burst fire bullets dispersion
     },
     [2] = {
          name = "M249", --name
          sprite = "gfx/weapons/m249.bmp", --hold sprite
          sprited = "gfx/weapons/m249_d.bmp", --drop sprite
          snd = "weapons/m249.wav", --sound
          range = 300, --range of bullet
          ammo = 800, --ammo in clip
          maxammo = 100, --carried ammo
          reloadt = 3000, --reload time
          sndrad = 400, --sound radius
          dmg = 17, --damage
          rid = 40, --real id; the actual weapon the player will have equipped
          disp = 3, --bullet dispersion
          burstmode = true, --burst mode available
          brf = 15, --burst fire bullets dispersion
     },
}

old

Egoist
User Off Offline

Its too bad it doesnt works for me, copied every file in the zip file but it gives the error:EXCEPTION ACCESS VIOLATION

Edit:I saw your edit and re-downloaded it, it looks it is working.
I like it!

old

gading
User Off Offline

cool, i saw this from youtube
I like it!

old

DevGru
User Off Offline

I love this script.
I like it!

old

maPmaKer
User Off Offline

Awesome, man!
I like it!

old

Infinite Rain
Reviewer Off Offline

Engi you can do like: Env_Item with name: cspawn <itemid>
I like it!

old

cloudboys
User Off Offline

Bloody epic script.
I like it!

old

Suprise
BANNED Off Offline

aww Bug :
When you choose ASR-2 and you are dead and you are dead when you used scope, that scope won't remove itself. also i can scooping with glock btw.
I like it!

old

Misho
User Off Offline

user Suprise it's cequip ID Weapon
That means cequip 1 1
Lol i tested but i had claws skin, but it's okay.
I like it!

old

Suprise
BANNED Off Offline

Hah for me doesn't work
Typed: cequip 1 F250 13 50
Btw Great work if this really works
I like it!

old

Misho
User Off Offline

lol i didn't know about this file.
I saw the video and it's pretty awesome.
I like it!

old

XTripleJaxX
User Off Offline

Any template script for that?

old

EngiN33R
Moderator Off Offline

No, CS2D doesn't provide that kind of integration with itself. You can create a map script and use the cspawn Lua function to spawn cweapons on certain positions.

old

XTripleJaxX
User Off Offline

Anyway to spawn weapons in the editor as a entity?

old

EngiN33R
Moderator Off Offline

@user Infinite Rain: Because it would involve more trickery and CPU cycles.

Thank you everyone for your words of praise.

@user XTripleJaxX: Open the Console commands box in the description and see for yourself.

old

XTripleJaxX
User Off Offline

So how do i spawn a weapon after making it?

old

Eternal
User Off Offline

Awesome !!
I like it!

old

Powermonger
User Off Offline

Very nice script! Awesome job!
If you aren't the best scripter you definitely are "the bestest"! : D
I like it!
To the start Previous 1 2 3 4 5 6 7 Next To the start